satengine/SatServer/SystemState/src/CSatSystemState.cpp
changeset 27 7eb70891911c
parent 15 d7fc66ccd6fb
--- a/satengine/SatServer/SystemState/src/CSatSystemState.cpp	Thu May 27 13:23:05 2010 +0300
+++ b/satengine/SatServer/SystemState/src/CSatSystemState.cpp	Fri Jun 11 14:07:16 2010 +0300
@@ -16,6 +16,7 @@
 */
 
 
+
 #include    <mtclreg.h>
 #include    <smsclnt.h>
 #include    <smutset.h>
@@ -25,7 +26,9 @@
 #include    <ProfileEngineSDKCRKeys.h>
 #include    <settingsinternalcrkeys.h>
 #include    <satdomainpskeys.h>
-#include    <activeidle2domainpskeys.h>
+#define Q_OS_SYMBIAN // needed to activate homescreendomainpskeys.h
+#include    <homescreendomainpskeys.h>
+
 // ******************************************************************
 // TODO: ScreensaverInternalPSKeys.h does no longer exist.
 // Must find an alternative way to check screen locked state.
@@ -273,16 +276,15 @@
 TBool CSatSystemState::IsPhoneInIdleStateL()
     {
     LOG( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsPhoneInIdleState calling" )
-    TInt idleStatus;
+    TInt idleStatus(EHomeScreenIdleState) ;
 
     // Get the idle status from P&S
     User::LeaveIfError( RProperty::Get(
-        KPSUidAiInformation,
-        KActiveIdleState,
-        idleStatus ) );
-
-    // Returns true if phone in idle state.
-    const TBool result( EPSAiForeground == idleStatus );
+        KHsCategoryUid, 
+        KHsCategoryStateKey, 
+        idleStatus));
+    // Returns true if phone in idle state. 
+    const TBool result( EHomeScreenIdleState == idleStatus ); 
 
     LOG2( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsPhoneInIdleState exiting \
         with value: %d", result )