KeyguardManagerpublic class KeyguardManager extends Object Class that can be used to lock and unlock the keyboard. Get an instance of this
class by calling {@link android.content.Context#getSystemService(java.lang.String)}
with argument {@link android.content.Context#KEYGUARD_SERVICE}. The
Actual class to control the keyboard locking is
{@link android.app.KeyguardManager.KeyguardLock}. |
Fields Summary |
---|
private android.view.IWindowManager | mWM |
Constructors Summary |
---|
KeyguardManager()
mWM = IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE));
|
Methods Summary |
---|
public void | exitKeyguardSecurely(android.app.KeyguardManager$OnKeyguardExitResult callback)Exit the keyguard securely. The use case for this api is that, after
disabling the keyguard, your app, which was granted permission to
disable the keyguard and show a limited amount of information deemed
safe without the user getting past the keyguard, needs to navigate to
something that is not safe to view without getting past the keyguard.
This will, if the keyguard is secure, bring up the unlock screen of
the keyguard.
try {
mWM.exitKeyguardSecurely(new IOnKeyguardExitResult.Stub() {
public void onKeyguardExitResult(boolean success) throws RemoteException {
callback.onKeyguardExitResult(success);
}
});
} catch (RemoteException e) {
}
| public boolean | inKeyguardRestrictedInputMode()If keyguard screen is showing or in restricted key input mode (i.e. in
keyguard password emergency screen). When in such mode, certain keys,
such as the Home key and the right soft keys, don't work.
try {
return mWM.inKeyguardRestrictedInputMode();
} catch (RemoteException ex) {
return false;
}
| public android.app.KeyguardManager$KeyguardLock | newKeyguardLock(java.lang.String tag)Enables you to lock or unlock the keyboard. Get an instance of this class by
calling {@link android.content.Context#getSystemService(java.lang.String) Context.getSystemService()}.
This class is wrapped by {@link android.app.KeyguardManager KeyguardManager}.
return new KeyguardLock(tag);
|
|