connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp	Tue Aug 31 15:35:44 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp	Wed Sep 01 12:23:51 2010 +0100
@@ -84,6 +84,13 @@
     {
     CLOG_ENTERFN( "CSelectWLanDlgPlugin::StartL " );  
     
+    if ( ScreenSaverOn() || AutolockOn() )
+        {
+        // Screen saver or Autolock is active. Cancel the dialog. 
+        aMessage.Complete( KErrCancel );
+        return;
+        }
+    
     TPckgBuf<TBool> asyncVersion;
     asyncVersion.Copy( aBuffer );
 
@@ -103,8 +110,7 @@
         {
         aMessage.ReadL( aReplySlot, iNetworkPrefs );
     
-        TInt err( KErrNone );
-        TRAP( err, iActivePlugin = CActiveSelectWLanDlgPlugin::NewL( this ) ); 
+        TRAPD( err, iActivePlugin = CActiveSelectWLanDlgPlugin::NewL( this ) ); 
         if ( err )
             {
             delete iActivePlugin;