connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp
branchRCL_3
changeset 26 0a9e01492035
parent 0 5a93021fdf25
child 45 4c83dcfb6f1a
--- a/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp	Tue May 11 16:35:05 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp	Tue May 25 13:08:02 2010 +0300
@@ -18,12 +18,14 @@
 
 // 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 "ConnectionDialogsNotifBase.h"
 
 // CONSTANTS
 
@@ -130,6 +132,43 @@
         }
     }
 
+// ---------------------------------------------------------
+// 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 );
+
+#ifdef RD_STARTUP_CHANGE
+    TInt err( KErrNone );
+    TInt autolockOn( 0 );
+    // Cancel the dialog if screen saver is on.
+    err = RProperty::Get( KPSUidCoreApplicationUIs, 
+            KCoreAppUIsAutolockStatus, 
+            autolockOn );
+    retval = (err == KErrNone && autolockOn > EAutolockOff);
+#endif
+
+    return retval; 
+    }
 
 
 // End of File