KeyguardLock
open classKeyguardLock
kotlin.Any | |
↳ | android.app.KeyguardManager.KeyguardLock |
Handle returned by KeyguardManager#newKeyguardLock
that allows you to temporarily disable / reenable the keyguard (lock screen).
Summary
Public methods | |
---|---|
open Unit |
Disable the keyguard from showing. |
open Unit |
Reenable the keyguard. |
Public methods
disableKeyguard
open fundisableKeyguard(): Unit
Deprecated: Deprecated in Java.
Disable the keyguard from showing. If the keyguard is currently showing, hide it. The keyguard will be prevented from showing again until reenableKeyguard()
is called.
This only works if the keyguard is not secure.
A good place to call this is from android.app.Activity#onResume()
Requires android.Manifest.permission#DISABLE_KEYGUARD
reenableKeyguard
open funreenableKeyguard(): Unit
Deprecated: Deprecated in Java.
Reenable the keyguard. The keyguard will reappear if the previous call to disableKeyguard()
caused it to be hidden. A good place to call this is from android.app.Activity#onPause()
Requires android.Manifest.permission#DISABLE_KEYGUARD
See Also