diff -r 7d48bed6ce0c -r 987c9837762f satengine/SatServer/SystemState/src/CSatSystemState.cpp --- a/satengine/SatServer/SystemState/src/CSatSystemState.cpp Tue Aug 31 15:45:17 2010 +0300 +++ b/satengine/SatServer/SystemState/src/CSatSystemState.cpp Wed Sep 01 12:15:03 2010 +0100 @@ -16,7 +16,6 @@ */ - #include #include #include @@ -26,14 +25,8 @@ #include #include #include -#define Q_OS_SYMBIAN // needed to activate homescreendomainpskeys.h -#include - -// ****************************************************************** -// TODO: ScreensaverInternalPSKeys.h does no longer exist. -// Must find an alternative way to check screen locked state. -// #include -// ****************************************************************** +#include +#include #include #include #include @@ -276,15 +269,16 @@ TBool CSatSystemState::IsPhoneInIdleStateL() { LOG( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsPhoneInIdleState calling" ) - TInt idleStatus(EHomeScreenIdleState) ; + TInt idleStatus; // Get the idle status from P&S User::LeaveIfError( RProperty::Get( - KHsCategoryUid, - KHsCategoryStateKey, - idleStatus)); - // Returns true if phone in idle state. - const TBool result( EHomeScreenIdleState == idleStatus ); + KPSUidAiInformation, + KActiveIdleState, + idleStatus ) ); + + // Returns true if phone in idle state. + const TBool result( EPSAiForeground == idleStatus ); LOG2( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsPhoneInIdleState exiting \ with value: %d", result ) @@ -300,11 +294,6 @@ LOG( SIMPLE, "SATSYSTEMSTATE: CSatSystemState::IsScreenSaverActivedFromIdle calling" ) TBool result( EFalse ); - - /* - // TODO: This method can no longer be used for checking screen saver status. - // Must find an alternative method. - TInt screenSaverActive( -1 ); // Get the idle status from P&S @@ -323,8 +312,7 @@ LOG2( SIMPLE, "SATSYSTEMSTATE: CSatSystemState:: IsScreenSaverActivedFromIdle \ err: %d", err ) - */ - + LOG2( SIMPLE, "SATSYSTEMSTATE: CSatSystemState:: \ IsScreenSaverActivedFromIdle exiting with value: %d", result )