Prevent Fixes
authorAmith Kumar Mahale <amith.m@samsung.com>
Thu, 27 Jun 2013 09:38:47 +0000 (15:08 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Thu, 27 Jun 2013 09:38:47 +0000 (15:08 +0530)
Change-Id: Ic2d214b5d889186431e0476231703c92a87fc9ba
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
src/CallActiveCallForm.cpp

index bc3a5a6..54f92ef 100644 (file)
@@ -110,7 +110,7 @@ ActiveCallForm::ActiveCallForm(FormType formType)
        __pActiveCallInfo = null;
        __pHeldCallInfo = null;
        __isSwapInProgress = false;
-       __pAddressbook == null;
+       __pAddressbook = null;
 }
 
 ActiveCallForm::~ActiveCallForm(void)
@@ -1086,11 +1086,6 @@ void
 ActiveCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
        RemoveOrientationEventListener(*this);
-       if (__pCallButtonsPanel != null)
-       {
-       //      RemoveControl(__pCallButtonsPanel);
-               __pCallButtonsPanel = null;
-       }
        if (__pActiveCallTimer != null)
        {
                __pActiveCallTimer->Cancel();
@@ -1196,11 +1191,6 @@ ActiveCallForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactC
        switch (__formType)
        {
 
-       case FORMTYPE_EMERGENCYOUTGOINGCALL:
-       {
-       }
-       break;
-
        case FORMTYPE_OUTGOINGCALL:
        case FORMTYPE_ACTIVECALL:
        {
@@ -1236,78 +1226,57 @@ ActiveCallForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactC
        {
 
                IListT<AppCallInfo>* pCallsList = __pCallPresentor->GetCallListN();
-               int listCount = pCallsList->GetCount();
-               for(int index = 0; index < listCount; index++)
+               if(pCallsList != null)
                {
-                       AppCallInfo callInfo;
-                       Contact* pContact;
-                       pCallsList->GetAt(index, callInfo);
-                       if(__pActiveCallInfo == null)
+                       int listCount = pCallsList->GetCount();
+                       for(int index = 0; index < listCount; index++)
                        {
-                               __pActiveCallInfo = new (std::nothrow) AppCallInfo();
-                       }
-                       *__pActiveCallInfo =  callInfo;
-                       String contactNumber;
-                       contactNumber.Append(__pActiveCallInfo->GetContactNumber());
-                       pContact = __pCallPresentor->GetContactN(__pActiveCallInfo->GetContactNumber());
-                       if(pContact == null)
-                       {
-                               __pActiveCallInfo->ResetContactNumber(null);
-                               __pActiveCallInfo->ResetContactInfo(null);
+                               AppCallInfo callInfo;
+                               Contact* pContact;
+                               pCallsList->GetAt(index, callInfo);
+                               if(__pActiveCallInfo == null)
+                               {
+                                       __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+                               }
+                               *__pActiveCallInfo =  callInfo;
+                               String contactNumber;
+                               contactNumber.Append(__pActiveCallInfo->GetContactNumber());
+                               pContact = __pCallPresentor->GetContactN(__pActiveCallInfo->GetContactNumber());
+                               if(pContact == null)
+                               {
+                                       __pActiveCallInfo->ResetContactNumber(null);
+                                       __pActiveCallInfo->ResetContactInfo(null);
+
+                               }
+                               else
+                               {
+                                       __pActiveCallInfo->SetContactNumber(contactNumber);
+                                       __pActiveCallInfo->SetContactInfo(*pContact);
+                               }
+                               if(pContact != null)
+                               {
+                                       delete pContact;
+                                       pContact = null;
+                               }
+                               if(callInfo.IsOnHold() == false)
+                               {
+                                       ShowPersonDetails(contactNumber, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+                               }
+                               else
+                               {
+                                       ShowPersonDetails(contactNumber, IDC_NUMBER2_LABEL, IDC_CALLER2_LABEL, true,__pActiveCallInfo);
+                               }
 
-                       }
-                       else
-                       {
-                               __pActiveCallInfo->SetContactNumber(contactNumber);
-                               __pActiveCallInfo->SetContactInfo(*pContact);
-                       }
-                       if(pContact != null)
-                       {
-                               delete pContact;
-                               pContact = null;
-                       }
-                       if(callInfo.IsOnHold() == false)
-                       {
-                               ShowPersonDetails(contactNumber, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
-                       }
-                       else
-                       {
-                               ShowPersonDetails(contactNumber, IDC_NUMBER2_LABEL, IDC_CALLER2_LABEL, true,__pActiveCallInfo);
                        }
 
-               }
-               if(pCallsList != null)
-               {
                        delete pCallsList;
                        pCallsList = null;
                }
-               //pCallsList = __pCallPresentor->GetCallListN();
-               //update calls state
-               //UpdateMultipleCallScreen(*pCallsList);
-               //delete pCallsList;
-               //pCallsList = null;
        }
        break;
-
-       case FORMTYPE_ACTIVECONFCALL:
-       {
-               int participantsCount = __pActiveCallInfo->GetCallerListCount();
-               IListT<AppCallInfo>* pParticipantListCallHandles = __pActiveCallInfo->GetCallerList();
-               for(int listCount = 0; listCount < participantsCount; listCount++)
-               {
-
-               }
-
-       }
-       break;
-
        default:
                break;
        }
-
-
-
-
        AppLog("Exit");
 }