commsconfig/cscgsplugin/src/cscgsplugin.cpp
branchRCL_3
changeset 14 be41ab7b952f
parent 10 ed1e38b404e5
--- a/commsconfig/cscgsplugin/src/cscgsplugin.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/commsconfig/cscgsplugin/src/cscgsplugin.cpp	Tue May 11 16:04:22 2010 +0300
@@ -239,19 +239,17 @@
     {
     // Get the correct application data
     RWsSession ws;
+    CleanupClosePushL( ws );
     User::LeaveIfError( ws.Connect() );
 
     // Find the task with uid
     TApaTaskList taskList( ws );
     TApaTask task = taskList.FindApp( KCscAppUid );
-    ws.Close();
 
     if ( task.Exists() )
         {
-        //Launch csc application as embedded
-        TAppInfo app( KCscAppUid, KCscApp );
-        iEmbedded = NULL;
-        EmbedAppL( app );
+        //Bring CSC to foreground.
+        task.BringToForeground();
         }
     else
         {
@@ -260,6 +258,7 @@
         iEmbedded = NULL;
         EmbedAppL( app );
         }
+    CleanupStack::PopAndDestroy( &ws );
     }