Merge "Keyguard can be on even if not showing"
This commit is contained in:
committed by
Android (Google) Code Review
commit
de53723d5b
@@ -3334,7 +3334,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
}
|
||||
|
||||
boolean keyguardOn() {
|
||||
return isKeyguardShowingAndNotOccluded();
|
||||
return isKeyguardShowingAndNotOccluded() || inKeyguardRestrictedKeyInputMode();
|
||||
}
|
||||
|
||||
private static final int[] WINDOW_TYPES_WHERE_HOME_DOESNT_WORK = {
|
||||
@@ -6876,6 +6876,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
return mKeyguardOccluded;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public boolean inKeyguardRestrictedKeyInputMode() {
|
||||
if (mKeyguardDelegate == null) return false;
|
||||
return mKeyguardDelegate.isInputRestricted();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismissKeyguardLw(IKeyguardDismissCallback callback) {
|
||||
if (mKeyguardDelegate != null && mKeyguardDelegate.isShowing()) {
|
||||
|
||||
@@ -1359,6 +1359,17 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
|
||||
*/
|
||||
public boolean isKeyguardTrustedLw();
|
||||
|
||||
/**
|
||||
* inKeyguardRestrictedKeyInputMode
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @return true if in keyguard restricted input mode.
|
||||
*/
|
||||
public boolean inKeyguardRestrictedKeyInputMode();
|
||||
|
||||
/**
|
||||
* Ask the policy to dismiss the keyguard, if it is currently shown.
|
||||
*
|
||||
|
||||
@@ -410,6 +410,11 @@ class TestWindowManagerPolicy implements WindowManagerPolicy {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inKeyguardRestrictedKeyInputMode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismissKeyguardLw(@Nullable IKeyguardDismissCallback callback) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user