phoneapp/phoneuiqtviewadapter/src/phoneuiqtviewadapter.cpp
changeset 30 ebdbd102c78a
parent 27 2f8f8080a020
child 51 f39ed5e045e0
--- a/phoneapp/phoneuiqtviewadapter/src/phoneuiqtviewadapter.cpp	Mon May 03 12:31:11 2010 +0300
+++ b/phoneapp/phoneuiqtviewadapter/src/phoneuiqtviewadapter.cpp	Fri May 14 15:51:57 2010 +0300
@@ -209,6 +209,7 @@
         m_view.removeExpandAction(bubble);
         m_bubbleWrapper->removeCallHeader (aCallId);
         m_bubbleWrapper->bubbleManager().endChanges();
+        m_indicatorController->clearActiveCallData();
         }
         break;
     case EPhoneViewRemoveFromConference:
@@ -484,6 +485,16 @@
     }
 }
 
+void PhoneUIQtViewAdapter::handleWindowActivated()
+{
+    m_indicatorController->disableActiveCallIndicator();
+}
+
+void PhoneUIQtViewAdapter::handleWindowDeactivated()
+{
+    m_indicatorController->enableActiveCallIndicator();
+}
+
 void PhoneUIQtViewAdapter::setTopApplication (TPhoneCommandParam *commandParam)
 {
     TPhoneCmdParamInteger *integerParam = static_cast<TPhoneCmdParamInteger *> (commandParam);
@@ -548,6 +559,7 @@
     if (1 == m_bubbleWrapper->bubbles().keys().count()) {
         setHidden(false);
     }
+    m_indicatorController->setActiveCallData( data.CLIText(), KNullDesC );
 }
 
 void PhoneUIQtViewAdapter::createEmergencyCallHeader(
@@ -1028,6 +1040,7 @@
             m_bubbleWrapper->bubbleManager().endChanges();
         }
     }
+    m_indicatorController->clearActiveCallData();
 }
 
 void PhoneUIQtViewAdapter::getNumberFromDialpad(
@@ -1074,13 +1087,15 @@
 
 void PhoneUIQtViewAdapter::setCallMenu()
 {
-    int bubbleId = m_bubbleWrapper->bubbleManager().expandedBubble();
-    int callId = m_bubbleWrapper->callIdByBubbleId(bubbleId);
-    m_uiCommandController->setCallMenuActions(
-            m_bubbleWrapper->callStates(),
-            m_bubbleWrapper->serviceIds(),
-            m_bubbleWrapper->serviceIdByCallId(callId),
-            callId );
+    if ( 0<m_bubbleWrapper->callStates().keys().size() ) {
+        int bubbleId = m_bubbleWrapper->bubbleManager().expandedBubble();
+        int callId = m_bubbleWrapper->callIdByBubbleId(bubbleId);
+        m_uiCommandController->setCallMenuActions(
+                m_bubbleWrapper->callStates(),
+                m_bubbleWrapper->serviceIds(),
+                m_bubbleWrapper->serviceIdByCallId(callId),
+                callId );
+    }
 
 }