From 0fc070c3be46085c5d15c0b9b10a2f9e6b100ab7 Mon Sep 17 00:00:00 2001 From: Amith Kumar Mahale Date: Mon, 15 Apr 2013 20:07:43 +0530 Subject: [PATCH 1/1] Prevent issue fix. Nabi issues fixed Change-Id: Id6f84ea018598d2cba930843132766c4da5e1c89 Signed-off-by: Amith Kumar Mahale --- inc/CallApp.h | 4 + inc/CallConfCallerListForm.h | 5 +- inc/CallPresentationModel.h | 2 +- inc/CallTelephonyManager.h | 2 + manifest.xml | 3 +- src/CallActiveCallForm.cpp | 2 + src/CallApp.cpp | 25 ++-- src/CallBaseForm.cpp | 2 +- src/CallConfCallerListForm.cpp | 258 +++++++++-------------------------------- src/CallEndCallForm.cpp | 2 + src/CallPresentationModel.cpp | 17 +-- src/CallTelephonyManager.cpp | 29 +++-- 12 files changed, 120 insertions(+), 231 deletions(-) diff --git a/inc/CallApp.h b/inc/CallApp.h index 9d8ab19..88df3ae 100644 --- a/inc/CallApp.h +++ b/inc/CallApp.h @@ -16,6 +16,7 @@ class CallApp : public Tizen::App::UiApp , public Tizen::System::IScreenEventListener , public Tizen::App::IAppControlProviderEventListener + , public Tizen::App::IActiveAppEventListener { public: /** @@ -58,6 +59,9 @@ public: // Called when the screen turns off. virtual void OnScreenOff(void); + //Called when application becomes active + virtual void OnActiveAppChanged(const Tizen::Base::String& appId); + virtual Tizen::Ui::Scenes::SceneId GetInitialScene(void); //Used to get launch arguments at application launch diff --git a/inc/CallConfCallerListForm.h b/inc/CallConfCallerListForm.h index 0ab9c88..baf8984 100644 --- a/inc/CallConfCallerListForm.h +++ b/inc/CallConfCallerListForm.h @@ -83,10 +83,6 @@ public: private: // Add the action listener for the buttons void AddActionListener(const Tizen::Base::String& keyName, CommandIds cmdId); - // Activate the panels to be shown according to the number of calls - void ActivatePanels(void); - // Activate each individual element in the panel - void ActivatePanelAndAddActionListener(const Tizen::Base::String& panelName, const Tizen::Base::String& lineLabelName, const Tizen::Base::String& splitButtonName, const Tizen::Base::String& endButtonName, const Tizen::Base::String& callerLabelName, SplitConfCallerCmdIds splitCmdId, EndConfCallerCmdIds EndCmdId, const Tizen::Base::String& displayName); // Method to show call duration/state(held) for call in progress void ShowTimerInfo(const Tizen::Base::String& timerLblName, long long startTime = 0); // Method to set "Hold" Button status @@ -99,6 +95,7 @@ private: //Timer used to show call time Tizen::Base::Runtime::Timer* __pConfCallTimer; Tizen::Ui::Controls::TableView* __pList; + bool __isCallSplit; }; #endif //_PHN_CONF_CALLER_LIST_FORM_H_ diff --git a/inc/CallPresentationModel.h b/inc/CallPresentationModel.h index afe0179..50d07e4 100644 --- a/inc/CallPresentationModel.h +++ b/inc/CallPresentationModel.h @@ -100,7 +100,7 @@ public: //Function to get the conference call info AppCallInfo* GetConferenceCallInfoN(void); //Split this call from the conference call - void SplitFromConference(SplitConfCallerCmdIds splitCallerCmdId, Tizen::Base::Collection::IListT* pConfCallList); + bool SplitFromConference(SplitConfCallerCmdIds splitCallerCmdId, Tizen::Base::Collection::IListT* pConfCallList); //End this single call from the conference call void EndCallFromConference(EndConfCallerCmdIds endCallerCmdId, Tizen::Base::Collection::IListT* pConfCallList); //returns true, if split operation is allowed. Else, returns false. diff --git a/inc/CallTelephonyManager.h b/inc/CallTelephonyManager.h index 90d562d..adb0e60 100644 --- a/inc/CallTelephonyManager.h +++ b/inc/CallTelephonyManager.h @@ -128,6 +128,8 @@ public: void EndAllCalls(void); //From ITelephonyNetworkEventListener virtual void OnTelephonyNetworkStatusChanged(const Tizen::Telephony::NetworkStatus& networkStatus); + //Used to check if a call is in incoming or dialing state. + bool IsIncomingorDialingCallPresent(void); protected: //function to handle the idle callback(received when call is ended) diff --git a/manifest.xml b/manifest.xml index 73f6752..4df0251 100644 --- a/manifest.xml +++ b/manifest.xml @@ -13,8 +13,9 @@ http://tizen.org/privilege/uimanager http://tizen.org/privilege/application.launch http://tizen.org/privilege/power + http://tizen.org/privilege/appusage http://tizen.org/privilege/setting - http://tizen.org/privilege/messaging.sms + http://tizen.org/privilege/messaging.write http://tizen.org/privilege/telephony http://tizen.org/privilege/vibrator http://tizen.org/privilege/contact.read diff --git a/src/CallActiveCallForm.cpp b/src/CallActiveCallForm.cpp index df2a4f3..469527e 100644 --- a/src/CallActiveCallForm.cpp +++ b/src/CallActiveCallForm.cpp @@ -330,6 +330,8 @@ ActiveCallForm::InitializeCallButtonsPanel(void) { pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT); pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT); + pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM); + pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP); } return r; diff --git a/src/CallApp.cpp b/src/CallApp.cpp index 3545d3d..99397f9 100644 --- a/src/CallApp.cpp +++ b/src/CallApp.cpp @@ -401,13 +401,6 @@ CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap,co //Check if its a valid number if(CheckNumberIsValid(phoneNumber) == false) { - //Show messageBox showing automatic call rejection - MessageBox InvalidNumberMsgBox; - InvalidNumberMsgBox.Construct(AppUtility::GetResourceString(IDS_INVALID_NUMBER), L"",MSGBOX_STYLE_NONE,1000); - int modalResult = 0; - // Calls ShowAndWait() : Draws and Shows itself and processes events - InvalidNumberMsgBox.ShowAndWait(modalResult); - //go back to previous scene if App was already running, else exit application. if(__initialSceneId.IsEmpty() == true) { @@ -519,15 +512,18 @@ CallApp::SetTopMostWindow(bool bTopMost) GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_HIGHEST); if(PowerManager::IsScreenOn() == false) { + AppLogDebug("TurnScreenOn"); res = PowerManager::TurnScreenOn(); + AppLogDebug("TurnScreenOn %d",res); } - res = PowerManager::KeepScreenOnState(true,false); + AppManager::GetInstance()->AddActiveAppEventListener(*this); } else { GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_NORMAL); PowerManager::KeepScreenOnState(false); + AppManager::GetInstance()->RemoveActiveAppEventListener(*this); } //Unlock the phone if its locked /* if(LockManager::GetInstance()->IsLocked()) @@ -537,3 +533,16 @@ CallApp::SetTopMostWindow(bool bTopMost) }*/ } +void +CallApp::OnActiveAppChanged(const String& appId) +{ + AppLogDebug("Enter %ls",appId.GetPointer()); + if(GetAppId().Equals(appId) == true) + { + result res = PowerManager::KeepScreenOnState(true,false); + AppLogDebug("KeepScreenOnState %d",res); + + + } + +} diff --git a/src/CallBaseForm.cpp b/src/CallBaseForm.cpp index 518f024..0f1ab33 100644 --- a/src/CallBaseForm.cpp +++ b/src/CallBaseForm.cpp @@ -325,8 +325,8 @@ BaseForm::HandleTelephonyError(int errorCode) if (__pErrorMsgPopup == null) { __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this); + __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode); } - __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode); } void diff --git a/src/CallConfCallerListForm.cpp b/src/CallConfCallerListForm.cpp index 6dd9a1c..ad5e8f8 100644 --- a/src/CallConfCallerListForm.cpp +++ b/src/CallConfCallerListForm.cpp @@ -103,6 +103,7 @@ ConfCallerListForm::ConfCallerListForm(void) { __pConfCallInfo = null; __pConfCallTimer = null; + __isCallSplit = false; } ConfCallerListForm::~ConfCallerListForm(void) @@ -224,8 +225,8 @@ ConfCallerListForm::OnActionPerformed(const Control& source, int actionId) //If success, then invert the Hold status in conference call isCallOnHold = !(isCallOnHold); __pConfCallInfo->SetOnHold(isCallOnHold); - //update panels and Hold button status - ActivatePanels(); + //update tableview + __pList->UpdateTableView(); SetHoldButtonStatus(isCallOnHold); } } @@ -280,7 +281,11 @@ ConfCallerListForm::OnActionPerformed(const Control& source, int actionId) { break; } - __pCallPresentor->SplitFromConference(SplitConfCallerCmdIds(actionId),__pConfCallInfo->GetCallerList()); + __isCallSplit = __pCallPresentor->SplitFromConference(SplitConfCallerCmdIds(actionId),__pConfCallInfo->GetCallerList()); + if(__isCallSplit == true) + { + __pList->UpdateTableView(); + } } break; @@ -309,6 +314,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen { //set itself as listener __pCallPresentor->SetTelEventListener(this); + __isCallSplit = false; AppLogDebug("Enter"); @@ -345,7 +351,6 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen __pList->UpdateTableView(); AddOrientationEventListener(*this); - //ActivatePanels(); } void @@ -423,9 +428,6 @@ ConfCallerListForm::HandleParticipantsChanged(void) } __pConfCallInfo = new (std::nothrow) AppCallInfo(); *__pConfCallInfo = *pCallInfo; - //Disable all key panels and redraw with new caller list - //DisableAllControls(); - //ActivatePanels(); __pList->UpdateTableView(); } @@ -475,164 +477,6 @@ ConfCallerListForm::DisableAllControls(void) } void -ConfCallerListForm::ActivatePanels(void) -{ - IListT* pCallList = __pConfCallInfo->GetCallerList(); - int confCallCount = pCallList->GetCount(); - - for (int index = 0; index < confCallCount; index++) - { - AppCallInfo callInfo; - String pContactNo; - result r = pCallList->GetAt(index, callInfo); - if(callInfo.GetContactNumber().IsEmpty() == false) - { - pContactNo.Append(callInfo.GetContactNumber()); - } - else - { - pContactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN)); - } - - //fetch contact details based on phone number - String* pDisplayName = callInfo.FetchCallerNameN(); - - if ((pDisplayName->IsEmpty()) || r != E_SUCCESS) - { - pDisplayName->Append(pContactNo); - } - - switch (index) - { - case 0: - { - ActivatePanelAndAddActionListener(IDC_CALLER1_PANEL,IDC__LINE_LABEL1,IDC_SPLIT_CALLER1,IDC_END_CALLER1 - ,IDC_CALLER1_LABEL,IDA_SPLIT_CALLER1,IDA_END_CALLER1,*pDisplayName); - } - break; - - case 1: - { - ActivatePanelAndAddActionListener(IDC_CALLER2_PANEL,IDC__LINE_LABEL2,IDC_SPLIT_CALLER2,IDC_END_CALLER2 - ,IDC_CALLER2_LABEL,IDA_SPLIT_CALLER2,IDA_END_CALLER2,*pDisplayName); - } - break; - - case 2: - { - ActivatePanelAndAddActionListener(IDC_CALLER3_PANEL,IDC__LINE_LABEL3,IDC_SPLIT_CALLER3,IDC_END_CALLER3 - ,IDC_CALLER3_LABEL,IDA_SPLIT_CALLER3,IDA_END_CALLER3,*pDisplayName); - } - break; - - case 3: - { - ActivatePanelAndAddActionListener(IDC_CALLER4_PANEL,IDC__LINE_LABEL4,IDC_SPLIT_CALLER4,IDC_END_CALLER4 - ,IDC_CALLER4_LABEL,IDA_SPLIT_CALLER4,IDA_END_CALLER4,*pDisplayName); - } - break; - - case 4: - { - ActivatePanelAndAddActionListener(IDC_CALLER5_PANEL,IDC__LINE_LABEL5,IDC_SPLIT_CALLER5,IDC_END_CALLER5 - ,IDC_CALLER5_LABEL,IDA_SPLIT_CALLER5,IDA_END_CALLER5,*pDisplayName); - } - break; - - default: - break; - } - - delete pDisplayName; - pDisplayName = null; - } -} - -void -ConfCallerListForm::ActivatePanelAndAddActionListener( const String& panelName, const String& lineLabelName, const String& splitButtonName, - const String& endButtonName, const String& callerLabelName, SplitConfCallerCmdIds splitCmdId, - EndConfCallerCmdIds EndCmdId, const String& displayName) -{ - Bitmap* pNormalSplitBitmap = null; - Bitmap* pPressSplitBitmap = null; - - - Bitmap* pNormalEndBitmap = null; - Bitmap* pPressEndBitmap = null; - - - - pNormalSplitBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SPLIT_NORMAL_BUTTON_ICON, - W_SPLIT_BITMAP, H_SPLIT_BITMAP); - pPressSplitBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SPLIT_PRESS_BUTTON_ICON, - W_SPLIT_BITMAP, H_SPLIT_BITMAP); - pNormalEndBitmap = AppUtility::GetBitmapFromResourcesN(IDB_END_NORMAL_BUTTON_ICON, - W_END_BITMAP, H_END_BITMAP); - pPressEndBitmap = AppUtility::GetBitmapFromResourcesN(IDB_END_PRESS_BUTTON_ICON, - W_END_BITMAP, H_END_BITMAP); - - bool isSplitAllowed = true; - if ((__pCallPresentor->IsSplitAllowed() == false) || (__pConfCallInfo->IsOnHold() == true)) - { - isSplitAllowed = false; - } - - Panel* pKeysPanel = static_cast(GetControl(panelName)); - if (pKeysPanel != null) - { - Button* pButtonSplit = static_cast(pKeysPanel->GetControl(splitButtonName)); - if (pButtonSplit != null) - { - pButtonSplit->SetActionId(splitCmdId); - pButtonSplit->AddActionEventListener(*this); - pButtonSplit->SetNormalBitmap(Point(0, 0), *pNormalSplitBitmap); - pButtonSplit->SetPressedBitmap(Point(0, 0), *pPressSplitBitmap); - } - Button* pButtonEnd = static_cast(pKeysPanel->GetControl(endButtonName)); - if (pButtonEnd != null) - { - pButtonEnd->SetActionId(EndCmdId); - pButtonEnd->AddActionEventListener(*this); - pButtonEnd->SetNormalBitmap(Point(0, 0), *pNormalEndBitmap); - pButtonEnd->SetPressedBitmap(Point(0, 0), *pPressEndBitmap); - } - Label* pNameLabel = static_cast(pKeysPanel->GetControl(callerLabelName)); - if (pButtonSplit != null) - { - if (isSplitAllowed == false) - { - pButtonSplit->SetShowState(false); - pNameLabel->SetBounds(pButtonSplit->GetBounds().x, pNameLabel->GetBounds().y, - pNameLabel->GetBounds().width, pNameLabel->GetBounds().height); - } - else - { - pButtonSplit->SetShowState(true); - pNameLabel->SetBounds((pButtonSplit->GetBounds().x + pButtonSplit->GetBounds().width), pNameLabel->GetBounds().y, - pNameLabel->GetBounds().width, pNameLabel->GetBounds().height); - } - } - pNameLabel->SetText(displayName); - - pKeysPanel->SetShowState(true); - Label* pLineLabel1 = static_cast(GetControl(lineLabelName)); - pLineLabel1->SetShowState(true); - - pKeysPanel->Draw(true); - pKeysPanel->Show(); - } - - delete pNormalEndBitmap; - pNormalEndBitmap = null; - delete pPressEndBitmap; - pPressEndBitmap = null; - delete pNormalSplitBitmap; - pNormalSplitBitmap = null; - delete pPressSplitBitmap; - pPressSplitBitmap = null; -} - -void ConfCallerListForm::ShowTimerInfo(const String& timerLblName, long long startTime) { Label* pTimerLbl = static_cast(GetControl(timerLblName)); @@ -760,9 +604,15 @@ ConfCallerListForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) void ConfCallerListForm::OnFormBackRequested(Form& source) { + //If the call is split then wait for it to automatically go back once it split is success + if(__isCallSplit == true) + { + return; + } SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); + ArrayListT* pCallList = static_cast*>(__pCallPresentor->GetCallListN()); int noOfCalls = pCallList->GetCount(); @@ -819,7 +669,7 @@ ConfCallerListForm::CreateItemAndAddActionListener( Button& splitButton, W_END_BITMAP, H_END_BITMAP); bool isSplitAllowed = true; - if ((__pCallPresentor->IsSplitAllowed() == false) || (__pConfCallInfo->IsOnHold() == true)) + if ((__pCallPresentor->IsSplitAllowed() == false) || (__pConfCallInfo->IsOnHold() == true) || (__isCallSplit == true)) { isSplitAllowed = false; } @@ -832,7 +682,8 @@ ConfCallerListForm::CreateItemAndAddActionListener( Button& splitButton, splitButton.SetPressedBitmap(Point(0, 0), *pPressSplitBitmap); - + bool isEnableEndButton = (__isCallSplit == false); + endButton.SetEnabled(isEnableEndButton); endButton.SetActionId(EndCmdId); endButton.AddActionEventListener(*this); endButton.SetNormalBitmap(Point(0, 0), *pNormalEndBitmap); @@ -910,44 +761,47 @@ ConfCallerListForm::CreateItem(int itemIndex, int itemWidth) //fetch contact details based on phone number String* pDisplayName = callInfo.FetchCallerNameN(); - if ((pDisplayName->IsEmpty()) || r != E_SUCCESS) - { - pDisplayName->Append(pContactNo); - } - switch (itemIndex) + if(pDisplayName != null) { - case 0: - { - CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, - IDA_SPLIT_CALLER1,IDA_END_CALLER1,*pDisplayName); - } - break; - case 1: - { - CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, - IDA_SPLIT_CALLER2,IDA_END_CALLER2,*pDisplayName); - } - break; - case 2: - { - CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, - IDA_SPLIT_CALLER3,IDA_END_CALLER3,*pDisplayName); - } - break; - case 3: + if ((pDisplayName->IsEmpty()) || r != E_SUCCESS) { - CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, - IDA_SPLIT_CALLER4,IDA_END_CALLER4,*pDisplayName); + pDisplayName->Append(pContactNo); } - break; - case 4: + switch (itemIndex) { - CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, - IDA_SPLIT_CALLER5,IDA_END_CALLER5,*pDisplayName); - } - break; - default: + case 0: + { + CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, + IDA_SPLIT_CALLER1,IDA_END_CALLER1,*pDisplayName); + } break; + case 1: + { + CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, + IDA_SPLIT_CALLER2,IDA_END_CALLER2,*pDisplayName); + } + break; + case 2: + { + CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, + IDA_SPLIT_CALLER3,IDA_END_CALLER3,*pDisplayName); + } + break; + case 3: + { + CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, + IDA_SPLIT_CALLER4,IDA_END_CALLER4,*pDisplayName); + } + break; + case 4: + { + CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel, + IDA_SPLIT_CALLER5,IDA_END_CALLER5,*pDisplayName); + } + break; + default: + break; + } } pItem->AddControl(*pSplitCallButton); pItem->AddControl(*pCallLabel); @@ -965,7 +819,9 @@ ConfCallerListForm::CreateItem(int itemIndex, int itemWidth) bool ConfCallerListForm::DeleteItem(int itemIndex, TableViewItem* pItem) { - return false; + delete pItem; + pItem = null; + return true; } void diff --git a/src/CallEndCallForm.cpp b/src/CallEndCallForm.cpp index 799a0e5..33fbefa 100644 --- a/src/CallEndCallForm.cpp +++ b/src/CallEndCallForm.cpp @@ -359,6 +359,8 @@ EndCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cu if(pContact != null) { SetContactButtonState(false); + delete pContact; + pContact = null; } else { diff --git a/src/CallPresentationModel.cpp b/src/CallPresentationModel.cpp index efea53c..dda4b4b 100644 --- a/src/CallPresentationModel.cpp +++ b/src/CallPresentationModel.cpp @@ -257,7 +257,7 @@ CallPresentationModel::GetConferenceCallInfoN(void) return __pTelephonyMgr->GetConferenceCallInfoN(); } -void +bool CallPresentationModel::SplitFromConference(SplitConfCallerCmdIds splitCallerCmdId, IListT* pConfCallList) { int callIndex = -1; @@ -293,11 +293,11 @@ CallPresentationModel::SplitFromConference(SplitConfCallerCmdIds splitCallerCmdI //split single call from conference r = __pTelephonyMgr->SplitFromConference(callToBeSpli.GetCallHandle()->ToLong()); TryCatch(r == E_SUCCESS,,"Split from conf. call failed"); - return; + return true; CATCH: __pTelEventListener->HandleTelephonyError(ERROR_SPLIT_FROM_CONFERENCE_FAILED); - return; + return false; } void @@ -584,13 +584,14 @@ CallPresentationModel::HandleCallDisconnected(bool isLastCall, Tizen::Base::Coll __pSettingsPresentor->SetCallState(CALL_STATE_CALL_VOICE_ACTIVE); } } - //Defer from sending call disconnected event to form, in case Msg AppControl is running, + //1) Defer from sending call disconnected event to form, in case Msg AppControl is running, //to avoid PhoneApp from going to EndCall form, where it shows for 3 sec. and automatically closes. - if (__pTelEventListener != null && __isMessageAppControlRunning == false) + //2) Do not send call disconnected event to any form, in case an incoming call or dialing call is present. + if (__pTelEventListener != null && __isMessageAppControlRunning == false + && __pTelephonyMgr->IsIncomingorDialingCallPresent() == false) { __pTelEventListener->HandleCallDisconnected(isLastCall, pCallList); } - } void @@ -620,7 +621,8 @@ CallPresentationModel::HandleCallSwapOccured(Tizen::Base::Collection::IListTIsIncomingorDialingCallPresent() == false) { __pTelEventListener->HandleConferenceChange(); } @@ -635,7 +637,6 @@ CallPresentationModel::HandleTelephonyError(int errorCode) } } - result CallPresentationModel::LaunchDialAppControl() { diff --git a/src/CallTelephonyManager.cpp b/src/CallTelephonyManager.cpp index fc34ab0..9b31aa4 100644 --- a/src/CallTelephonyManager.cpp +++ b/src/CallTelephonyManager.cpp @@ -1529,6 +1529,10 @@ TelephonyManager::HandleEndFromConferenceCallbackResponse(TapiHandle* pHandle, i isParticipantCallEnded = pTelManager->HandleParticipantEndedFromConference(callEndNotification.id, endConfCall); } } + else + { + AppLog("TAPI Failed - %d", callBackResult); + } //Check if participant call or Conference call was not found, then show error if (isParticipantCallEnded == false) @@ -1586,12 +1590,17 @@ TelephonyManager::HandleParticipantEndedFromConference(unsigned int participantC __pActiveCallList->Remove(confCallHandle); __pActiveCallList->Add(pActiveCall->GetCallHandle()->ToLong(), *pActiveCall); pActiveCall = null; - //using the callConnected to switch to single active screen - //or update multiple active call screen - IListT* pActiveCallList = __pActiveCallList->GetValuesN(); - __pEventListener->HandleCallConnected(*pActiveCallList); - delete pActiveCallList; - pActiveCallList = null; + + //Check if there is no incoming or dialing call exist, then only notify to change screen, Else ignore + if (IsIncomingorDialingCallPresent() == false) + { + //using the callConnected to switch to single active screen + //or update multiple active call screen + IListT* pActiveCallList = __pActiveCallList->GetValuesN(); + __pEventListener->HandleCallConnected(*pActiveCallList); + delete pActiveCallList; + pActiveCallList = null; + } } else { @@ -2610,9 +2619,15 @@ TelephonyManager::SaveCallInfoToLogsDb(AppCallInfo& endCallInfo) void TelephonyManager::OnTelephonyNetworkStatusChanged(const NetworkStatus& networkStatus) { - if(networkStatus.IsCallServiceAvailable() == false) { EndAllCalls(); } } + +bool +TelephonyManager::IsIncomingorDialingCallPresent(void) +{ + //returns false, if incoming call or dialed call is present. + return ((__pIncomingCall != null) || (__pDialedCall != null)); +} -- 2.7.4