mmsharing/mmshui/src/musuieventcontroller.cpp
branchRCL_3
changeset 21 ce86b6d44a6d
parent 18 0da2e08216b6
child 31 33a5d2bbf6fc
--- a/mmsharing/mmshui/src/musuieventcontroller.cpp	Tue May 25 12:38:39 2010 +0300
+++ b/mmsharing/mmshui/src/musuieventcontroller.cpp	Wed Jun 09 09:37:52 2010 +0300
@@ -65,7 +65,6 @@
 CMusUiEventController::~CMusUiEventController()
     {
     MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::~CMusUiEventController" );
-    delete iResourceHandler;
     delete iStatusPropertyWatch;    
     delete iContactName;
     delete iTelNumber;
@@ -140,7 +139,8 @@
 
     iMmcMonitor = CMusUiMmcMonitor::NewL( *this );
 
-    iResourceHandler = CMusUiResourceHandler::NewL( iEventObserver );
+    iResourceHandler = iEventObserver.ResourceHandler();
+    __ASSERT_ALWAYS( iResourceHandler, User::Leave( KErrNotFound ) );
     
     //Mic mute status property
     iMicMuteStatusPropertyWatch = CMusUiPropertyWatch::NewL(
@@ -603,6 +603,8 @@
     {
     MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::ExitProcedureL" );
     
+    iSharingObserver.DismissMenuBar();
+    
     switch ( iShutdownState )
         {
         case EMusUiShutdownStarted: 
@@ -692,6 +694,11 @@
         aConnectionInitialized );
     
     iConnectionInitialized = aConnectionInitialized;
+    
+    if ( !iForeground && !ExitOccured() )
+        {
+        TRAP_IGNORE( EnableDisplayL(EFalse) )
+        }
     }
     
 // -----------------------------------------------------------------------------
@@ -847,6 +854,14 @@
     MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::HandleForegroundEventL" );
     }
 
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMusUiEventController::IsForeground() const
+    {
+    return iForeground;
+    }
 
 // -----------------------------------------------------------------------------
 //