Prevent issue fix. Nabi issues fixed
authorAmith Kumar Mahale <amith.m@samsung.com>
Mon, 15 Apr 2013 14:37:43 +0000 (20:07 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Mon, 15 Apr 2013 14:37:43 +0000 (20:07 +0530)
Change-Id: Id6f84ea018598d2cba930843132766c4da5e1c89
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
12 files changed:
inc/CallApp.h
inc/CallConfCallerListForm.h
inc/CallPresentationModel.h
inc/CallTelephonyManager.h
manifest.xml
src/CallActiveCallForm.cpp
src/CallApp.cpp
src/CallBaseForm.cpp
src/CallConfCallerListForm.cpp
src/CallEndCallForm.cpp
src/CallPresentationModel.cpp
src/CallTelephonyManager.cpp

index 9d8ab19..88df3ae 100644 (file)
@@ -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
index 0ab9c88..baf8984 100644 (file)
@@ -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_
index afe0179..50d07e4 100644 (file)
@@ -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<AppCallInfo>* pConfCallList);
+       bool SplitFromConference(SplitConfCallerCmdIds splitCallerCmdId, Tizen::Base::Collection::IListT<AppCallInfo>* pConfCallList);
        //End this single call from the conference call
        void EndCallFromConference(EndConfCallerCmdIds endCallerCmdId, Tizen::Base::Collection::IListT<AppCallInfo>* pConfCallList);
        //returns true, if split operation is allowed. Else, returns false.
index 90d562d..adb0e60 100644 (file)
@@ -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)
index 73f6752..4df0251 100644 (file)
@@ -13,8 +13,9 @@
             <Privilege>http://tizen.org/privilege/uimanager</Privilege>
             <Privilege>http://tizen.org/privilege/application.launch</Privilege>
             <Privilege>http://tizen.org/privilege/power</Privilege>
+            <Privilege>http://tizen.org/privilege/appusage</Privilege>
             <Privilege>http://tizen.org/privilege/setting</Privilege>
-            <Privilege>http://tizen.org/privilege/messaging.sms</Privilege>
+            <Privilege>http://tizen.org/privilege/messaging.write</Privilege>
             <Privilege>http://tizen.org/privilege/telephony</Privilege>
             <Privilege>http://tizen.org/privilege/vibrator</Privilege>
             <Privilege>http://tizen.org/privilege/contact.read</Privilege>
index df2a4f3..469527e 100644 (file)
@@ -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;
index 3545d3d..99397f9 100644 (file)
@@ -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);
+
+
+       }
+
+}
index 518f024..0f1ab33 100644 (file)
@@ -325,8 +325,8 @@ BaseForm::HandleTelephonyError(int errorCode)
        if (__pErrorMsgPopup == null)
        {
                __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this);
+               __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode);
        }
-       __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode);
 }
 
 void
index 6dd9a1c..ad5e8f8 100644 (file)
@@ -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<AppCallInfo>* 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<Panel*>(GetControl(panelName));
-       if (pKeysPanel != null)
-       {
-               Button* pButtonSplit = static_cast<Button*>(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<Button*>(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<Label*>(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<Label*>(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<Label*>(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<AppCallInfo>* pCallList  = static_cast<ArrayListT<AppCallInfo>*>(__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
index 799a0e5..33fbefa 100644 (file)
@@ -359,6 +359,8 @@ EndCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cu
                        if(pContact != null)
                        {
                                SetContactButtonState(false);
+                               delete pContact;
+                               pContact = null;
                        }
                        else
                        {
index efea53c..dda4b4b 100644 (file)
@@ -257,7 +257,7 @@ CallPresentationModel::GetConferenceCallInfoN(void)
        return __pTelephonyMgr->GetConferenceCallInfoN();
 }
 
-void
+bool
 CallPresentationModel::SplitFromConference(SplitConfCallerCmdIds splitCallerCmdId, IListT<AppCallInfo>* 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::IListT<App
 void
 CallPresentationModel::HandleConferenceChange(void)
 {
-       if (__pTelEventListener != null)
+       //1) Do not send conf. call changed event to any form, in case an incoming call or dialing call is present.
+       if (__pTelEventListener != null && __pTelephonyMgr->IsIncomingorDialingCallPresent() == false)
        {
                __pTelEventListener->HandleConferenceChange();
        }
@@ -635,7 +637,6 @@ CallPresentationModel::HandleTelephonyError(int errorCode)
        }
 }
 
-
 result
 CallPresentationModel::LaunchDialAppControl()
 {
index fc34ab0..9b31aa4 100644 (file)
@@ -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<AppCallInfo>* 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<AppCallInfo>* 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));
+}