connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp	Tue Aug 31 15:35:44 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp	Wed Sep 01 12:23:51 2010 +0100
@@ -25,7 +25,7 @@
 
 #include <e32property.h>         // For RProperty 
 #include <UikonInternalPSKeys.h> // For KPSUidUikon and KUikGlobalNotesAllowed.
-#include <connuiutilsnotif.rsg>
+#include <ConnUiUtilsNotif.rsg>
 
 
 // ================= MEMBER FUNCTIONS =======================
@@ -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 );