--- a/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp Tue Aug 31 15:35:44 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp Wed Sep 01 12:23:51 2010 +0100
@@ -18,12 +18,19 @@
// INCLUDE FILES
-#include "ConnectionDialogsNotifBase.h"
-
+#include <e32property.h>
+#include <ScreensaverInternalPSKeys.h>
+#include <coreapplicationuisdomainpskeys.h>
#include <bautils.h>
#include <eikenv.h>
#include <data_caging_path_literals.hrh>
+#include "ConnectionDialogsLogger.h"
+#include "ConnectionDialogsNotifBase.h"
+
+#ifdef _DEBUG
+#include <e32debug.h>
+#endif
// CONSTANTS
@@ -88,13 +95,9 @@
// ---------------------------------------------------------
//
CConnectionDialogsNotifBase::CConnectionDialogsNotifBase()
-: iReplySlot( 0 ),
- iCancelled( EFalse ),
+: iCancelled( EFalse ),
iResource( 0 )
{
- iInfo.iUid = TUid::Null();
- iInfo.iChannel = TUid::Null();
- iInfo.iPriority = 0;
}
@@ -134,6 +137,55 @@
}
}
+// ---------------------------------------------------------
+// CConnectionDialogsNotifBase::ScreenSaverOn()
+// ---------------------------------------------------------
+//
+TBool CConnectionDialogsNotifBase::ScreenSaverOn()
+ {
+ TInt err( KErrNone );
+ TInt screenSaverOn( 0 );
+
+ // Cancel the dialog if screen saver is on.
+ err = RProperty::Get( KPSUidScreenSaver,
+ KScreenSaverOn,
+ screenSaverOn );
+
+ return (err == KErrNone && screenSaverOn > 0);
+ }
+
+// ---------------------------------------------------------
+// CConnectionDialogsNotifBase::AutolockOn()
+// ---------------------------------------------------------
+//
+TBool CConnectionDialogsNotifBase::AutolockOn()
+ {
+ TBool retval( EFalse );
+
+ CLOG_ENTERFN( "CConnectionDialogsNotifBase::AutolockOn" );
+
+#ifdef RD_STARTUP_CHANGE
+ TInt err( KErrNone );
+ TInt autolockOn( 0 );
+ // Cancel the dialog if screen saver is on.
+ err = RProperty::Get( KPSUidCoreApplicationUIs,
+ KCoreAppUIsAutolockStatus,
+ autolockOn );
+ // In boot there may come EAutolockStatusUninitialized, when it should be EAutolockOn...
+ retval = (err == KErrNone && autolockOn != EAutolockOff);
+
+#ifdef _DEBUG
+ RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: autolockOn: %d"), autolockOn );
+ RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: err: %d"), err );
+ RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: %d"), retval );
+#endif
+
+#endif // RD_STARTUP_CHANGE
+
+ CLOG_LEAVEFN( "CConnectionDialogsNotifBase::AutolockOn" );
+
+ return retval;
+ }
// End of File