Fix for 44593 42495
[apps/osp/Call.git] / src / CallConfCallerListForm.cpp
index 2ae1ee2..7f272bd 100644 (file)
@@ -104,6 +104,7 @@ ConfCallerListForm::ConfCallerListForm(void)
        __pConfCallInfo = null;
        __pConfCallTimer = null;
        __isCallSplit = false;
+       __pAddressbook = null;
 }
 
 ConfCallerListForm::~ConfCallerListForm(void)
@@ -330,6 +331,13 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        __pConfCallInfo = __pCallPresentor->GetConferenceCallInfoN();
        AppLogDebug("Enter %x",__pConfCallInfo);
 
+       AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+       __pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+       if(__pAddressbook != null)
+       {
+               __pAddressbook->SetAddressbookChangeEventListener(this);
+       }
+
        //show active call timer
        ShowTimerInfo(IDC_CALL_TIME_LABEL, __pConfCallInfo->GetCallConnectTime());
 
@@ -364,6 +372,10 @@ ConfCallerListForm::OnSceneDeactivated(const SceneId& currentSceneId, const Scen
                delete __pConfCallTimer;
                __pConfCallTimer = null;
        }
+       if(__pAddressbook != null)
+       {
+               __pAddressbook->SetAddressbookChangeEventListener(null);
+       }
 }
 
 result
@@ -653,6 +665,18 @@ ConfCallerListForm::OnFormBackRequested(Form& source)
 }
 
 void
+ConfCallerListForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList)
+{
+       __pList->UpdateTableView();
+}
+
+void
+ConfCallerListForm::OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList)
+{
+       //No implementation
+}
+
+void
 ConfCallerListForm::CreateItemAndAddActionListener( Button& splitButton,
                Button& endButton, Label& callerLabel, SplitConfCallerCmdIds splitCmdId,
                EndConfCallerCmdIds EndCmdId, const String& displayName)
@@ -762,7 +786,7 @@ ConfCallerListForm::CreateItem(int itemIndex, int itemWidth)
                pContactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
        }
        //fetch contact details based on phone number
-       String* pDisplayName = callInfo.FetchCallerNameN();
+       String* pDisplayName = callInfo.FetchLatestCallerNameN(pContactNo);
 
        if(pDisplayName != null)
        {