From: Amith Kumar Mahale Date: Tue, 19 Mar 2013 13:15:24 +0000 (+0530) Subject: Fix for N_SE-28854 N_SE-29290 N_SE-27358 N_SE-25429 N_SE-25498 N_SE-25689 N_SE-27155... X-Git-Tag: accepted/tizen_2.1/20130425.023544~22 X-Git-Url: http://review.tizen.org/git/?p=apps%2Fosp%2FCall.git;a=commitdiff_plain;h=4711ba9d753006a5456eba411f221a032fa48dc8 Fix for N_SE-28854 N_SE-29290 N_SE-27358 N_SE-25429 N_SE-25498 N_SE-25689 N_SE-27155 N_SE-27389 N_SE-26697 N_SE-27060 N_SE-27686 N_SE-29309 N_SE-28242 N_SE-28732 N_SE-29310 N_SE-28454 N_SE-28531 N_SE-28919 N_SE-29095 Change-Id: I732fdc951c1de7e5a8df2877bbd4e661c95d9318 Signed-off-by: Amith Kumar Mahale --- diff --git a/inc/AppResourceId.h b/inc/AppResourceId.h new file mode 100644 index 0000000..9e259f8 --- /dev/null +++ b/inc/AppResourceId.h @@ -0,0 +1,6 @@ +#ifndef _APPRESOURCEID_H_ +#define _APPRESOURCEID_H_ + +extern const wchar_t* IDF_FORM; + +#endif // _APPRESOURCEID_H_ diff --git a/inc/CallApp.h b/inc/CallApp.h index 7be1215..3e55fcb 100644 --- a/inc/CallApp.h +++ b/inc/CallApp.h @@ -69,6 +69,8 @@ public: // Called when the application control request is received from the caller application. virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData); + //Called when incoming call has to be handled + void SetTopMostWindow(bool bTopMost); private: //internal function to process AppControl request. diff --git a/manifest.xml b/manifest.xml index 8278c48..5609a0c 100644 --- a/manifest.xml +++ b/manifest.xml @@ -10,7 +10,9 @@ 2.0 + http://tizen.org/privilege/uimanager http://tizen.org/privilege/application.launch + http://tizen.org/privilege/power http://tizen.org/privilege/setting http://tizen.org/privilege/messaging.sms http://tizen.org/privilege/vibrator diff --git a/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml b/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml index 4c14ba7..4b24d62 100644 --- a/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml +++ b/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml @@ -4,14 +4,14 @@ --> - + - + diff --git a/src/AppResourceId.cpp b/src/AppResourceId.cpp new file mode 100644 index 0000000..f563fb2 --- /dev/null +++ b/src/AppResourceId.cpp @@ -0,0 +1,3 @@ +#include "AppResourceId.h" + +const wchar_t* IDF_FORM = L"IDF_FORM"; diff --git a/src/CallApp.cpp b/src/CallApp.cpp index 4a1db2e..be2b3f3 100644 --- a/src/CallApp.cpp +++ b/src/CallApp.cpp @@ -348,7 +348,9 @@ CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap) { //KEEP "__initialSceneId" as empty and return false from "OnAppInitialized()" AppLog("Terminate Phone Application"); + AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null); Terminate(); + return; } } @@ -405,6 +407,7 @@ CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap) } else { + AppLog("Outgoing call"); pSceneManager->GoForward( ForwardSceneTransition( nextScene), __pLaunchArgs); } appControlResult = APP_CTRL_RESULT_SUCCEEDED; @@ -428,7 +431,7 @@ bool CallApp::CheckNumberIsValid(String phoneNumber) { //Pattern to compare all characters except 0-9 * # P ; , + - String phoneNumberPattern(L"[^0-9*#P;,+]"); + String phoneNumberPattern(L"[^0-9*#P,+]"); RegularExpression checkPhoneNumber; checkPhoneNumber.Construct(phoneNumberPattern); //If there is any character other than these listed above then display invalid number @@ -437,3 +440,28 @@ CallApp::CheckNumberIsValid(String phoneNumber) return !resultMatch; } + +void +CallApp::SetTopMostWindow(bool bTopMost) +{ + AppLogDebug("bTopMost = %d",bTopMost); + result res = E_FAILURE; + //ToDO: Need to see if there is better way to handle + //this case + if(bTopMost == true) + { + GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_HIGH); + if(PowerManager::IsScreenOn() == false) + { + res = PowerManager::TurnScreenOn(); + } + res = PowerManager::KeepScreenOnState(true,false); + + } + else + { + GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_NORMAL); + PowerManager::KeepScreenOnState(false); + } + +} diff --git a/src/CallIncomingCallForm.cpp b/src/CallIncomingCallForm.cpp index b731b03..ad4175f 100644 --- a/src/CallIncomingCallForm.cpp +++ b/src/CallIncomingCallForm.cpp @@ -26,6 +26,7 @@ #include "CallPresentationModel.h" #include "CallSceneRegister.h" #include "CallTypes.h" +#include "CallApp.h" using namespace Tizen::App; using namespace Tizen::Base; @@ -814,6 +815,10 @@ IncomingCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneI delete pArgs; pArgs = null; } + CallApp* pCallApp = static_cast(CallApp::GetInstance()); + pCallApp->SetTopMostWindow(true); + + } void @@ -854,6 +859,8 @@ IncomingCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneI } } + CallApp* pCallApp = static_cast(CallApp::GetInstance()); + pCallApp->SetTopMostWindow(false); } result diff --git a/src/CallSoundManager.cpp b/src/CallSoundManager.cpp index d724bd1..cd3d870 100644 --- a/src/CallSoundManager.cpp +++ b/src/CallSoundManager.cpp @@ -30,6 +30,11 @@ using namespace Tizen::Base::Collection; using namespace Tizen::Base::Runtime; static const wchar_t* RINGTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/ringtone_sdk.mp3"; +static const wchar_t* CALLCONNECTTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_Connect.ogg"; +static const wchar_t* CALLDISCONNECTTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_Disconnect.ogg"; +static const wchar_t* MINUTEREMINDERTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_RecordStart.wav"; +static const wchar_t* CALLWAITINGTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_WaitingTone.wav"; + SoundManager::SoundManager(void) : __pSoundCallSession(null) @@ -205,13 +210,17 @@ SoundManager::OnTimerExpired(Timer& timer) __pPlayer->Construct(*this); } - reminderTonePath.Append(RINGTONE_PATH); - __pPlayer->OpenFile(reminderTonePath,false); - __pPlayer->SetLooping(false); - __pPlayer->SetVolume(80); - SetSoundMode(SOUND_MODE_MEDIA); - __pPlayer->Play(); - SetSoundMode(SOUND_MODE_VOICE); + reminderTonePath.Append(MINUTEREMINDERTONE_PATH); + if(reminderTonePath.IsEmpty() == false) + { + __pPlayer->Close(); + __pPlayer->OpenFile(reminderTonePath,false); + __pPlayer->SetLooping(false); + __pPlayer->SetVolume(80); + SetSoundMode(SOUND_MODE_MEDIA); + __pPlayer->Play(); + SetSoundMode(SOUND_MODE_VOICE); + } } /*else if(ReminderToneSetStatus == false) { @@ -233,23 +242,21 @@ SoundManager::SetDisconnectTone(void) if(disconnectToneSetStatus == true) { - disconnectTonePath.Append(RINGTONE_PATH); - + disconnectTonePath.Append(CALLDISCONNECTTONE_PATH); if(__pPlayer == null) { __pPlayer = new (std::nothrow) Player(); __pPlayer->Construct(*this); } - if(disconnectTonePath.IsEmpty() == false) { + __pPlayer->Close(); __pPlayer->OpenFile(disconnectTonePath,false); __pPlayer->SetLooping(false); __pPlayer->SetVolume(80); SetSoundMode(SOUND_MODE_MEDIA); __pPlayer->Play(); } - } } @@ -264,7 +271,7 @@ SoundManager::SetMinuteReminderTone() if(reminderToneSetStatus == true) { - __timer.StartAsRepeatable(20000); + __timer.StartAsRepeatable(60000); } } @@ -280,18 +287,19 @@ SoundManager::SetConnectTone() vconf_get_bool(VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL, &unknownRejectStatus); bool connectToneSetStatus = unknownRejectStatus; - connectTonePath.Append(RINGTONE_PATH); + connectTonePath.Append(CALLCONNECTTONE_PATH); if(connectToneSetStatus == true) { + if(__pPlayer == null) { __pPlayer = new (std::nothrow) Player(); r = __pPlayer->Construct(*this); } - - if(connectTonePath.IsEmpty() == false) + if (connectTonePath.IsEmpty() == false) { + r = __pPlayer->OpenFile(connectTonePath,false); r = __pPlayer->SetLooping(false); r = __pPlayer->SetVolume(80); @@ -308,6 +316,22 @@ SoundManager::StartAlert(String& contactRingTone) if(__pSoundCallSession != null) { AppLogDebug("No Alert already in call"); + String waitingTonePath; + waitingTonePath.Append(CALLWAITINGTONE_PATH); + if(__pPlayer == null) + { + __pPlayer = new (std::nothrow) Player(); + __pPlayer->Construct(*this); + } + if (waitingTonePath.IsEmpty() == false) + { + __pPlayer->Close(); + __pPlayer->OpenFile(waitingTonePath,false); + __pPlayer->SetLooping(true); + __pPlayer->SetVolume(80); + SetSoundMode(SOUND_MODE_MEDIA); + __pPlayer->Play(); + } return; } else diff --git a/src/CallTelephonyManager.cpp b/src/CallTelephonyManager.cpp index dd2e5cc..9059e43 100644 --- a/src/CallTelephonyManager.cpp +++ b/src/CallTelephonyManager.cpp @@ -919,6 +919,7 @@ TelephonyManager::DialOutgoingCall(String& contactNumber, bool isEmergency) { TelCallDial_t structDialCall; + AppLogDebug("Enter"); //conversion "contactNumber" to char* const wchar_t* pContact = contactNumber.GetPointer(); int len = contactNumber.GetLength()+1;