Prevent issue fix. Nabi issues fixed
[apps/osp/Call.git] / src / CallPresentationModel.cpp
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()
 {