Code example for KeyguardManager

Methods: exitKeyguardSecurelyinKeyguardRestrictedInputMode

0
        } 
    } 
 
    public static synchronized boolean inKeyguardRestrictedInputMode() { 
        if (mKeyguardManager != null) {
            return mKeyguardManager.inKeyguardRestrictedInputMode();
        } 
        return false; 
    } 
 
    public static synchronized void reenableKeyguard() { 
        if (mKeyguardManager != null) {
            if (mKeyguardLock != null) {
                mKeyguardLock.reenableKeyguard();
                mKeyguardLock = null;
            } 
        } 
    } 
 
    public static synchronized void exitKeyguardSecurely(final LaunchOnKeyguardExit callback) {
        if (inKeyguardRestrictedInputMode()) { 
            mKeyguardManager.exitKeyguardSecurely(new OnKeyguardExitResult() {
                @Override 
                public void onKeyguardExitResult(boolean success) {
                    reenableKeyguard(); 
                    if (success) {
                        callback.LaunchOnKeyguardExitSuccess();