// ----------------------------------------------------------------------------- // 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; }