connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/OfflineWlanNoteNotif.cpp
branchRCL_3
changeset 24 05bc53fe583b
parent 17 0a9e01492035
child 25 83ca720e2b9a
equal deleted inserted replaced
23:fc7b30ed2058 24:05bc53fe583b
    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 
    59     // We are about to display the Offline note.
    61     // We are about to display the Offline note.
    60     // Since this part of the code can be executed during the bootup, check if
    62     // Since this part of the code can be executed during the bootup, check if
    61     // the UI has really started up to display notes/dialogs.
    63     // the UI has really started up to display notes/dialogs.
    62     TInt notesAllowed = 0;
    64     TInt notesAllowed = 0;
    63     User::LeaveIfError ( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed,
    65     User::LeaveIfError ( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed,
    64                                         notesAllowed ) );
    66                                         notesAllowed ) );
    65 
    67 
    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 
       
    74     iReplySlot = aReplySlot;
    68     iReplySlot = aReplySlot;
    75     iMessage = aMessage;
    69     iMessage = aMessage;
    76     iCancelled = EFalse;
       
    77 
    70 
    78     CLOG_WRITEF( _L( "notesAllowed : %d" ), notesAllowed );
    71     CLOG_WRITEF( _L( "notesAllowed : %d" ), notesAllowed );
    79 
    72 
    80     if ( notesAllowed )
    73     if ( notesAllowed )
    81         {
    74         {