diff -r e4e3998ddda2 -r 9f95a5546443 uiresources_pub/pictograph_api/tsrc/src/testsdkpictograph.cpp --- a/uiresources_pub/pictograph_api/tsrc/src/testsdkpictograph.cpp Tue Aug 31 16:13:36 2010 +0300 +++ b/uiresources_pub/pictograph_api/tsrc/src/testsdkpictograph.cpp Wed Sep 01 12:19:53 2010 +0100 @@ -23,6 +23,7 @@ // INCLUDE FILES #include #include +#include #include #include "testsdkpictograph.h" @@ -103,6 +104,8 @@ EFalse ); SendTestClassVersion(); + + TurnOffScreenSaver(); } // ----------------------------------------------------------------------------- @@ -154,4 +157,31 @@ { return ( CScriptBase* ) CTestSDKPicToGraph::NewL( aTestModuleIf ); } + +// ----------------------------------------------------------------------------- +// Turn off ScreenSaver +// ----------------------------------------------------------------------------- +// +void CTestSDKPicToGraph::TurnOffScreenSaver() + { + TInt err1 = RProperty::Get( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, + iOldScreenSaverProperty ); + TInt err2 = RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, + KScreenSaverAllowScreenSaver ); + RDebug::Printf( "screensaver property=%d err1=%d err2=%d\n", + iOldScreenSaverProperty, err1, err2 ); + } + +// ----------------------------------------------------------------------------- +// Restore ScreenSaver +// ----------------------------------------------------------------------------- +// +void CTestSDKPicToGraph::RestoreScreenSaver() + { + RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, + iOldScreenSaverProperty ); + User::ResetInactivityTime(); + } + + // End of File