KeyguardLock
open classKeyguardLock
| kotlin.Any | |
| ↳ | android.app.KeyguardManager.KeyguardLock |
Handle returned by KeyguardManager#newKeyguardLock that allows you to disable / reenable the keyguard.
Summary
Public methods |
|
|---|---|
| open Unit |
Disable the keyguard from showing. |
| open Unit |
Reenable the keyguard. |
Public methods
disableKeyguard
open fundisableKeyguard(): Unit
Deprecated.
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. A good place to call this is from android.app.Activity#onResume() Note: This call has no effect while any android.app.admin.DevicePolicyManager is enabled that requires a password.
Requires android.Manifest.permission#DISABLE_KEYGUARD
See Also
reenableKeyguard
open funreenableKeyguard(): Unit
Deprecated.
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() Note: This call has no effect while any android.app.admin.DevicePolicyManager is enabled that requires a password.
Requires android.Manifest.permission#DISABLE_KEYGUARD
See Also