// ----------------------------------------------------------------------------- // CTestSDKKeyLock::TestKLEnableAutoLockEmulationL // ----------------------------------------------------------------------------- TInt CTestSDKKeyLock::TestKLEnableAutoLockEmulationL( CStifItemParser& /*aItem*/ ) { RAknKeyLock enableautolockemulation; CleanupClosePushL( enableautolockemulation ); STIF_ASSERT_NOT_LEAVES( enableautolockemulation.Connect() ); STIF_ASSERT_NOT_NULL( &enableautolockemulation ); enableautolockemulation.EnableAutoLockEmulation(); enableautolockemulation.EnableSoftNotifications( EFalse ); CleanupStack::PopAndDestroy( &enableautolockemulation ); return KErrNone; }
// ----------------------------------------------------------------------------- // CTestSDKKeyLock::TestKLEnableSoftNotificationsL // ----------------------------------------------------------------------------- TInt CTestSDKKeyLock::TestKLEnableSoftNotificationsL( CStifItemParser& /*aItem*/ ) { RAknKeyLock enablesoftnotifications; CleanupClosePushL( enablesoftnotifications ); STIF_ASSERT_NOT_LEAVES( enablesoftnotifications.Connect() ); STIF_ASSERT_NOT_NULL( &enablesoftnotifications ); enablesoftnotifications.EnableKeyLock(); STIF_ASSERT_TRUE( enablesoftnotifications.IsKeyLockEnabled() ); TBool enable = EFalse; enablesoftnotifications.EnableSoftNotifications( enable ); enablesoftnotifications.DisableKeyLock(); STIF_ASSERT_FALSE( enablesoftnotifications.IsKeyLockEnabled() ); CleanupStack::PopAndDestroy( &enablesoftnotifications ); return KErrNone; }
// ----------------------------------------------------------------------------- // CTestSDKKeyLock::TestKLCancelAllNotificationsL // ----------------------------------------------------------------------------- TInt CTestSDKKeyLock::TestKLCancelAllNotificationsL( CStifItemParser& /*aItem*/ ) { RAknKeyLock cancelallnotifications; CleanupClosePushL( cancelallnotifications ); STIF_ASSERT_NOT_LEAVES( cancelallnotifications.Connect() ); STIF_ASSERT_NOT_NULL( &cancelallnotifications ); cancelallnotifications.EnableKeyLock(); STIF_ASSERT_TRUE( cancelallnotifications.IsKeyLockEnabled() ); TBool enable = ETrue; cancelallnotifications.EnableSoftNotifications( enable ); cancelallnotifications.CancelAllNotifications(); cancelallnotifications.DisableKeyLock(); STIF_ASSERT_FALSE( cancelallnotifications.IsKeyLockEnabled() ); CleanupStack::PopAndDestroy( &cancelallnotifications ); return KErrNone; }