connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp
branchRCL_3
changeset 26 0a9e01492035
parent 0 5a93021fdf25
child 57 05bc53fe583b
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp	Tue May 11 16:35:05 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/SelectWLanDlgPlugin.cpp	Tue May 25 13:08:02 2010 +0300
@@ -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;