emailuis/emailui/src/ncscomposeview.cpp
branchRCL_3
changeset 31 72d484772ca6
parent 8 e1b6206813b4
child 13 0396474f30f5
--- a/emailuis/emailui/src/ncscomposeview.cpp	Fri Feb 19 22:37:30 2010 +0200
+++ b/emailuis/emailui/src/ncscomposeview.cpp	Fri Mar 12 15:41:14 2010 +0200
@@ -408,6 +408,28 @@
         Toolbar()->SetDimmed( EFalse );
         RefreshToolbar();
         }
+        
+    // if there is a embedded app in FSEmail.
+    if( iAppUi.EmbeddedApp() )
+        {
+        // Set email editor started from embedded app flag to true 
+        // so that we can switch view correct when sent email.
+        iAppUi.SetEditorStartedFromEmbeddedApp( ETrue );
+        
+        RWsSession rwsSession;
+        User::LeaveIfError( rwsSession.Connect() );
+        CleanupClosePushL( rwsSession );
+        
+        // Simulate a back key to exit embedded app 
+        // so that email editor could show on the top level.
+        TKeyEvent KeyEvent = TKeyEvent();
+        KeyEvent.iCode = EKeyCBA2;
+        rwsSession.SimulateKeyEvent( KeyEvent );
+
+        rwsSession.Close();
+        CleanupStack::PopAndDestroy( &rwsSession );
+        }
+        
     TIMESTAMP( "Editor launched" );
     }