Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

KeyguardManager.KeyguardLock

extends Object
java.lang.Object
   ↳ android.app.KeyguardManager.KeyguardLock

This class was deprecated in API level 13.
Use FLAG_DISMISS_KEYGUARD and/or FLAG_SHOW_WHEN_LOCKED instead; this allows you to seamlessly hide the keyguard as your application moves in and out of the foreground and does not require that any special permissions be requested. Handle returned by newKeyguardLock(String) that allows you to disable / reenable the keyguard.

Summary

Public Methods
void disableKeyguard ()
Disable the keyguard from showing.
void reenableKeyguard ()
Reenable the keyguard.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void disableKeyguard ()

Added in API level 1

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 onResume() Note: This call has no effect while any DevicePolicyManager is enabled that requires a password.

This method requires the caller to hold the permission DISABLE_KEYGUARD .

public void reenableKeyguard ()

Added in API level 1

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 onPause() Note: This call has no effect while any DevicePolicyManager is enabled that requires a password.

This method requires the caller to hold the permission DISABLE_KEYGUARD .