fix for 36237 2.1b_release accepted/tizen_2.1/20130426.150124 submit/tizen_2.1/20130426.135821
authorAmith Kumar Mahale <amith.m@samsung.com>
Thu, 25 Apr 2013 13:57:09 +0000 (19:27 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Thu, 25 Apr 2013 13:57:09 +0000 (19:27 +0530)
Change-Id: If4144e3964366cbb0b11d8906e1ca2414e363782
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
LICENSE.Flora
src/CallApp.cpp
src/CallBaseForm.cpp
src/CallTelephonyManager.cpp

index 9c95663..fd90a36 100644 (file)
@@ -1,6 +1,6 @@
 Flora License
 
-Version 1.0, May, 2012
+Version 1.0, April, 2013
 
 http://floralicense.org/license/
 
@@ -67,8 +67,8 @@ on behalf of whom a Contribution has been received by Licensor and
 subsequently incorporated within the Work.
 
 "Tizen Certified Platform" shall mean a software platform that complies
-with the standards set forth in the Compatibility Definition Document
-and passes the Compatibility Test Suite as defined from time to time
+with the standards set forth in the Tizen Compliance Specification
+and passes the Tizen Compliance Tests as defined from time to time
 by the Tizen Technical Steering Group and certified by the Tizen
 Association or its designated agent.
 
index 714b8ca..c793f2c 100644 (file)
@@ -425,6 +425,12 @@ CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap,co
                                Terminate();
                                return;
                        }
+                       else
+                       {
+                               //invalid phone number.always return, but App will come to foreground
+                               //and show current screen, if any calls is present.
+                               return;
+                       }
                }
                //call type
                pKey = new (std::nothrow) String(PARAM_CALL_TYPE);
index 8122a03..31d5ea3 100644 (file)
@@ -231,6 +231,7 @@ BaseForm::HandleCallDisconnected(bool isLastCall, IListT<AppCallInfo>& pCurrentA
                                pCallInfoList->Add(pCaller);
                        }
                }
+
                if (callCount == 1)
                {
                        //fetch call info and add to list
@@ -246,7 +247,8 @@ BaseForm::HandleCallDisconnected(bool isLastCall, IListT<AppCallInfo>& pCurrentA
 
                        if (isLastCall == true)
                        {
-                               //goto End Call form if single call. else terminate
+                               //list contains 1 last ended call to show EndCall screen.
+                               //goto End Call form if single call was ended else terminate
                                if (callInfo.IsConferenceCall() == false)
                                {
                                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ENDCALL), pCallInfoList);
@@ -258,6 +260,7 @@ BaseForm::HandleCallDisconnected(bool isLastCall, IListT<AppCallInfo>& pCurrentA
                        }
                        else
                        {
+                               //list contains 1 active call
                                if (pCurrentActiveCallList.GetCount() == 1)
                                {
                                        if (callInfo.IsConferenceCall() == true)
@@ -274,6 +277,7 @@ BaseForm::HandleCallDisconnected(bool isLastCall, IListT<AppCallInfo>& pCurrentA
                }
                else
                {
+                       //multiple active calls are present.
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MULTIPLEACTIVECALL), pCallInfoList);
                }
        }
index e9dce02..f3d821b 100644 (file)
@@ -390,19 +390,21 @@ TelephonyManager::EndCall(AppCallInfo& endCallInfo)
 result
 TelephonyManager::AnswerAutoRejectCall(int callHandle)
 {
+       //Incoming call automatically blocked is handled here.
        AppLogDebug("Enter ");
        result r = E_FAILURE;
-       TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_ACCEPT;
+       TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_REJECT;
        int res = -1;
 
        AppLogDebug("tel_answer_call");
-       answerType = TAPI_CALL_ANSWER_REJECT;
+       //save to logs db.
        AppCallInfo rejectedCallInfo;
        rejectedCallInfo = *(__pIncomingCall);
        rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_BLOCKED);
        SaveCallInfoToLogsDb(rejectedCallInfo);
        delete __pIncomingCall;
        __pIncomingCall = null;
+
        // redirect to reject call back handler as the flow has to be handled
        res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleCallbackResponse, this);
 
@@ -1287,8 +1289,7 @@ void
 TelephonyManager::HandleRejectCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
 {
        AppLogDebug("ENTER");
-       // This callback comes only if user has either rejected an incoming call from IncomingCallForm.
-       // or the incoming call was automatically blocked.
+       // This callback comes only if user has rejected an incoming call from IncomingCallForm.
        TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
        if (pData != null && callBackResult == TAPI_API_SUCCESS)
        {
@@ -1298,65 +1299,48 @@ TelephonyManager::HandleRejectCallbackResponse(TapiHandle* pHandle, int callBack
                //Check if incoming call is rejected
                if (pTelManager->__pIncomingCall != null && (rejectedCallHandle == (unsigned int) pTelManager->__pIncomingCall->GetCallHandle()->ToLong()))
                {
+                       AppLogDebug("Call rejected by user");
                        AppCallInfo rejectedCallInfo;
                        rejectedCallInfo = *(pTelManager->__pIncomingCall);
                        delete pTelManager->__pIncomingCall;
                        pTelManager->__pIncomingCall = null;
 
-                       //Check if number was automatically rejected using settings, then don't give any notification to user.
-                       bool showIncomingCallRejectedNotification = true;
-                       if (((pTelManager->__pSettingsManager->GetUnknownRejectStatus() == true) && (rejectedCallInfo.GetContactInfo() == null))
-                                               || (pTelManager->__pSettingsManager->IsCallToBeRejected(rejectedCallInfo.GetContactNumber()) == true))
-                       {
-                               //blocked
-                               AppLogDebug("Call blocked");
-                               showIncomingCallRejectedNotification = false;
-                               rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_BLOCKED);
-                       }
-                       else
-                       {
-                               AppLogDebug("Call rejected");
-                               //rejected by user from incoming call form
-                               showIncomingCallRejectedNotification = true;
-                               rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_REJECTED);
-                       }
+                       //rejected by user from incoming call form
+                       rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_REJECTED);
                        //Save rejected incoming call to call log db.
                        pTelManager->SaveCallInfoToLogsDb(rejectedCallInfo);
 
-                       if (showIncomingCallRejectedNotification == true)
+                       //check if the ended call was the last call
+                       bool isLastCall = (pTelManager->__pActiveCallList->GetCount() == 0);
+                       //Stop alert - started only for incoming calls which are not blocked.
+                       if(pTelManager->__pSoundManager != null)
                        {
-                               //check if the ended call was the last call
-                               bool isLastCall = (pTelManager->__pActiveCallList->GetCount() == 0);
-                               //Stop alert - started only for incoming calls which are not blocked.
-                               if(pTelManager->__pSoundManager != null)
-                               {
-                                       pTelManager->__pSoundManager->StopAlert();
-                                       //Do not call stop session if there is already a call going on
-                                       if(isLastCall == true)
-                                       {
-                                               pTelManager->__pSoundManager->StopSession();
-                                       }
-                               }
-                               //Send notification to user
-                               ArrayListT<AppCallInfo>* pCallList = null;
-                               if (isLastCall)
+                               pTelManager->__pSoundManager->StopAlert();
+                               //Do not call stop session if there is already a call going on
+                               if(isLastCall == true)
                                {
-                                       //save 'RejectedCall' to list to show on EndCallForm
-                                       pCallList = new (std::nothrow) ArrayListT<AppCallInfo>();
-                                       pCallList->Construct(1);
-                                       AppCallInfo* pRejectedCall = new (std::nothrow) AppCallInfo();
-                                       *pRejectedCall = rejectedCallInfo;
-                                       pCallList->Add(*pRejectedCall);
+                                       pTelManager->__pSoundManager->StopSession();
                                }
-                               else
-                               {
-                                       //fetch active calls to show appropriate scene
-                                       pCallList = static_cast<ArrayListT<AppCallInfo>*>(pTelManager->__pActiveCallList->GetValuesN());
-                               }
-                               pTelManager->__pEventListener->HandleCallDisconnected(isLastCall, *pCallList);
-                               delete pCallList;
-                               pCallList = null;
                        }
+                       //Send notification to user
+                       ArrayListT<AppCallInfo>* pCallList = null;
+                       if (isLastCall)
+                       {
+                               //save 'RejectedCall' to list to show on EndCallForm
+                               pCallList = new (std::nothrow) ArrayListT<AppCallInfo>();
+                               pCallList->Construct(1);
+                               AppCallInfo* pRejectedCall = new (std::nothrow) AppCallInfo();
+                               *pRejectedCall = rejectedCallInfo;
+                               pCallList->Add(*pRejectedCall);
+                       }
+                       else
+                       {
+                               //fetch active calls to show appropriate scene
+                               pCallList = static_cast<ArrayListT<AppCallInfo>*>(pTelManager->__pActiveCallList->GetValuesN());
+                       }
+                       pTelManager->__pEventListener->HandleCallDisconnected(isLastCall, *pCallList);
+                       delete pCallList;
+                       pCallList = null;
                }
        }
        else
@@ -1811,7 +1795,7 @@ TelephonyManager::HandleIdleCallBack(void* pData)
        //This callback comes when any type of calls are ended
        //We do NOT handle below scenarios here -
        //1) In incoming call scenarios, if we end any active calls - handled in "AcceptCall()".
-       //2) Incoming call automatically blocked and rejection by user scenarios are handled in "HandleRejectCallbackResponse()".
+       //2) Incoming call automatically blocked is handled in "AnswerAutoRejectCall()" and rejection by user scenarios are handled in "HandleRejectCallbackResponse()".
        //3) End conference call is handled in "HandleEndConferenceCallbackResponse()".
        //4) End Single Call from Conference call by user is handled in "HandleEndFromConferenceCallbackResponse()".
        //5) End Single Call from Conference call using eventInjector is diverted to "HandleParticipantEndedFromConference()".