connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp
branchRCL_3
changeset 26 0a9e01492035
parent 0 5a93021fdf25
child 57 05bc53fe583b
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp	Tue May 11 16:35:05 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp	Tue May 25 13:08:02 2010 +0300
@@ -56,8 +56,6 @@
     TPckgBuf<TBool> asyncVersion;
     asyncVersion.Copy( aBuffer );
 
-    iCancelled = EFalse;
-
     // We are about to display the Offline note.
     // Since this part of the code can be executed during the bootup, check if
     // the UI has really started up to display notes/dialogs.
@@ -65,8 +63,17 @@
     User::LeaveIfError ( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed,
                                         notesAllowed ) );
 
+    if ( ScreenSaverOn() || AutolockOn() )
+        {
+        // Screen saver or Autolock is active. Cancel the dialog. 
+        CLOG_WRITE( "COfflineWlanNoteNotif::StartL: Screen saver or Autolock is active." );
+        aMessage.Complete( KErrCancel );
+        return;
+        }
+
     iReplySlot = aReplySlot;
     iMessage = aMessage;
+    iCancelled = EFalse;
 
     CLOG_WRITEF( _L( "notesAllowed : %d" ), notesAllowed );