Prevent issue fix. 2Nabi issues fixed
[apps/osp/Call.git] / src / CallConfCallerListForm.cpp
index 9b82799..6dd9a1c 100644 (file)
@@ -134,6 +134,8 @@ ConfCallerListForm::OnInitializing(void)
                SetFormBackEventListener(this);
                pFooter->SetBackButton();
        }
+       Label* pTimerLbl = static_cast<Label*>(GetControl(IDC_CALL_TIME_LABEL));
+       SetControlAlwaysOnTop(*pTimerLbl,true);
 
        CreateTableView();
        __pCallPresentor = CallPresentationModel::GetInstance();
@@ -175,7 +177,7 @@ ConfCallerListForm::OnTerminating(void)
                __pConfCallInfo = null;
        }
 
-       RemoveAllControls();
+       //RemoveAllControls();
        return r;
 }
 
@@ -231,7 +233,7 @@ ConfCallerListForm::OnActionPerformed(const Control& source, int actionId)
 
        case IDA_BACK_EVENT:
        {
-               ArrayListT<CallInfo>* pCallList  = static_cast<ArrayListT<CallInfo>*>(__pCallPresentor->GetCallListN());
+               ArrayListT<AppCallInfo>* pCallList  = static_cast<ArrayListT<AppCallInfo>*>(__pCallPresentor->GetCallListN());
                int noOfCalls = pCallList->GetCount();
 
                //Ownership - To be deleted in 'OnSceneActivatedN' of next form
@@ -241,12 +243,12 @@ ConfCallerListForm::OnActionPerformed(const Control& source, int actionId)
                for (int index = 0; index < noOfCalls; index++)
                {
                        //fetch call info and add to list
-                       CallInfo callInfo;
+                       AppCallInfo callInfo;
                        result r = pCallList->GetAt(index, callInfo);
                        if (r == E_SUCCESS)
                        {
                                //copy call information to new instance
-                               CallInfo* pCaller = new (std::nothrow) CallInfo();
+                               AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
                                *pCaller = callInfo;
                                pCallInfoList->Add(pCaller);
                        }
@@ -308,7 +310,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        //set itself as listener
        __pCallPresentor->SetTelEventListener(this);
 
-       AddOrientationEventListener(*this);
+       AppLogDebug("Enter");
 
        //DisableAllControls();
        if (__pConfCallInfo != null)
@@ -319,6 +321,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        //show 1st caller's info.
        //Fetch Conference call info from telephony manager
        __pConfCallInfo = __pCallPresentor->GetConferenceCallInfoN();
+       AppLogDebug("Enter %x",__pConfCallInfo);
 
        //show active call timer
        ShowTimerInfo(IDC_CALL_TIME_LABEL, __pConfCallInfo->GetCallConnectTime());
@@ -341,6 +344,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        }
 
        __pList->UpdateTableView();
+       AddOrientationEventListener(*this);
        //ActivatePanels();
 }
 
@@ -348,11 +352,6 @@ void
 ConfCallerListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
        RemoveOrientationEventListener(*this);
-       if (__pConfCallInfo != null)
-       {
-               delete __pConfCallInfo;
-               __pConfCallInfo = null;
-       }
        if (__pConfCallTimer != null)
        {
                __pConfCallTimer->Cancel();
@@ -411,7 +410,8 @@ ConfCallerListForm::SetHoldButtonStatus(bool isCallOnHold)
 void
 ConfCallerListForm::HandleParticipantsChanged(void)
 {
-       CallInfo* pCallInfo = __pCallPresentor->GetConferenceCallInfoN();
+       AppLogDebug("Enter");
+       AppCallInfo* pCallInfo = __pCallPresentor->GetConferenceCallInfoN();
        if (pCallInfo == null)
        {
                return;
@@ -421,7 +421,7 @@ ConfCallerListForm::HandleParticipantsChanged(void)
                delete __pConfCallInfo;
                __pConfCallInfo = null;
        }
-       __pConfCallInfo = new (std::nothrow) CallInfo();
+       __pConfCallInfo = new (std::nothrow) AppCallInfo();
        *__pConfCallInfo = *pCallInfo;
        //Disable all key panels and redraw with new caller list
        //DisableAllControls();
@@ -477,12 +477,12 @@ ConfCallerListForm::DisableAllControls(void)
 void
 ConfCallerListForm::ActivatePanels(void)
 {
-       IListT<CallInfo>* pCallList = __pConfCallInfo->GetCallerList();
+       IListT<AppCallInfo>* pCallList = __pConfCallInfo->GetCallerList();
        int confCallCount = pCallList->GetCount();
 
        for (int index = 0; index < confCallCount; index++)
        {
-               CallInfo callInfo;
+               AppCallInfo callInfo;
                String pContactNo;
                result r = pCallList->GetAt(index, callInfo);
                if(callInfo.GetContactNumber().IsEmpty() == false)
@@ -763,7 +763,7 @@ ConfCallerListForm::OnFormBackRequested(Form& source)
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
 
-       ArrayListT<CallInfo>* pCallList  = static_cast<ArrayListT<CallInfo>*>(__pCallPresentor->GetCallListN());
+       ArrayListT<AppCallInfo>* pCallList  = static_cast<ArrayListT<AppCallInfo>*>(__pCallPresentor->GetCallListN());
        int noOfCalls = pCallList->GetCount();
 
        //Ownership - To be deleted in 'OnSceneActivatedN' of next form
@@ -773,12 +773,12 @@ ConfCallerListForm::OnFormBackRequested(Form& source)
        for (int index = 0; index < noOfCalls; index++)
        {
                //fetch call info and add to list
-               CallInfo callInfo;
+               AppCallInfo callInfo;
                result r = pCallList->GetAt(index, callInfo);
                if (r == E_SUCCESS)
                {
                        //copy call information to new instance
-                       CallInfo* pCaller = new (std::nothrow) CallInfo();
+                       AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
                        *pCaller = callInfo;
                        pCallInfoList->Add(pCaller);
                }
@@ -870,14 +870,15 @@ ConfCallerListForm::CreateItemAndAddActionListener( Button& splitButton,
 int
 ConfCallerListForm::GetItemCount(void)
 {
-       IListT<CallInfo>* pCallList = __pConfCallInfo->GetCallerList();
+       IListT<AppCallInfo>* pCallList = __pConfCallInfo->GetCallerList();
        return pCallList->GetCount();
 }
 
 TableViewItem*
 ConfCallerListForm::CreateItem(int itemIndex, int itemWidth)
 {
-       IListT<CallInfo>* pCallList = __pConfCallInfo->GetCallerList();
+       AppLogDebug("%d %x",itemWidth,__pConfCallInfo);
+       IListT<AppCallInfo>* pCallList = __pConfCallInfo->GetCallerList();
 
        TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
        TableViewItem* pItem = new (std::nothrow) TableViewItem();
@@ -894,7 +895,7 @@ ConfCallerListForm::CreateItem(int itemIndex, int itemWidth)
        pEndCallButton->Construct(Rectangle(GetBounds().width-X_END_BUTTON_PADDING-W_SPLIT_BITMAP,Y_SPLIT_BUTTON_MARGIN,W_SPLIT_BITMAP,W_SPLIT_BITMAP));
 
 
-       CallInfo callInfo;
+       AppCallInfo callInfo;
        String pContactNo;
        result r = pCallList->GetAt(itemIndex, callInfo);
 
@@ -951,6 +952,11 @@ ConfCallerListForm::CreateItem(int itemIndex, int itemWidth)
        pItem->AddControl(*pSplitCallButton);
        pItem->AddControl(*pCallLabel);
        pItem->AddControl(*pEndCallButton);
+       if(pDisplayName != null)
+       {
+               delete pDisplayName;
+               pDisplayName = null;
+       }
        return pItem;