connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
    23 #include "ConnUiUtilsNotif.h"
    23 #include "ConnUiUtilsNotif.h"
    24 #include "ConnectionDialogsLogger.h"
    24 #include "ConnectionDialogsLogger.h"
    25 
    25 
    26 #include <e32property.h>         // For RProperty 
    26 #include <e32property.h>         // For RProperty 
    27 #include <UikonInternalPSKeys.h> // For KPSUidUikon and KUikGlobalNotesAllowed.
    27 #include <UikonInternalPSKeys.h> // For KPSUidUikon and KUikGlobalNotesAllowed.
    28 #include <connuiutilsnotif.rsg>
    28 #include <ConnUiUtilsNotif.rsg>
    29 
    29 
    30 
    30 
    31 // ================= MEMBER FUNCTIONS =======================
    31 // ================= MEMBER FUNCTIONS =======================
    32 
    32 
    33 // ---------------------------------------------------------
    33 // ---------------------------------------------------------
    54     CLOG_ENTERFN( "COfflineWlanNoteNotif::StartL" );
    54     CLOG_ENTERFN( "COfflineWlanNoteNotif::StartL" );
    55 
    55 
    56     TPckgBuf<TBool> asyncVersion;
    56     TPckgBuf<TBool> asyncVersion;
    57     asyncVersion.Copy( aBuffer );
    57     asyncVersion.Copy( aBuffer );
    58 
    58 
    59     iCancelled = EFalse;
       
    60 
       
    61     // We are about to display the Offline note.
    59     // We are about to display the Offline note.
    62     // Since this part of the code can be executed during the bootup, check if
    60     // Since this part of the code can be executed during the bootup, check if
    63     // the UI has really started up to display notes/dialogs.
    61     // the UI has really started up to display notes/dialogs.
    64     TInt notesAllowed = 0;
    62     TInt notesAllowed = 0;
    65     User::LeaveIfError ( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed,
    63     User::LeaveIfError ( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed,
    66                                         notesAllowed ) );
    64                                         notesAllowed ) );
    67 
    65 
       
    66     if ( ScreenSaverOn() || AutolockOn() )
       
    67         {
       
    68         // Screen saver or Autolock is active. Cancel the dialog. 
       
    69         CLOG_WRITE( "COfflineWlanNoteNotif::StartL: Screen saver or Autolock is active." );
       
    70         aMessage.Complete( KErrCancel );
       
    71         return;
       
    72         }
       
    73 
    68     iReplySlot = aReplySlot;
    74     iReplySlot = aReplySlot;
    69     iMessage = aMessage;
    75     iMessage = aMessage;
       
    76     iCancelled = EFalse;
    70 
    77 
    71     CLOG_WRITEF( _L( "notesAllowed : %d" ), notesAllowed );
    78     CLOG_WRITEF( _L( "notesAllowed : %d" ), notesAllowed );
    72 
    79 
    73     if ( notesAllowed )
    80     if ( notesAllowed )
    74         {
    81         {