summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2016-08-05 21:20:41 +0000
committer android-build-merger <android-build-merger@google.com> 2016-08-05 21:20:41 +0000
commit4d514b7388b99dd692a8cd2c317117e5a1e1e5e2 (patch)
tree2e9c6a10ed4a60971ee9852e51f3f1ef30a96797
parent92c9c4f3e6932958f5728705cb7ce1c255aa4a43 (diff)
parent3b51c256a707f7a2903f2ea44c33a2eb11473171 (diff)
Keyguard: Improve trusted unlock while occluded am: ddcdecc952 am: 1f9b02b03a
am: 3b51c256a7 Change-Id: I248cd2d0d6707757f7fe2ae7c27f3b0393679290
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 9a8f322b3f91..122990a7643c 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -3643,7 +3643,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public boolean canShowDismissingWindowWhileLockedLw() {
- return false;
+ // If the keyguard is trusted, it will unlock without a challange. Therefore, windows with
+ // FLAG_DISMISS_KEYGUARD don't need to be force hidden, as they will unlock the phone right
+ // away anyways.
+ return mKeyguardDelegate != null && mKeyguardDelegate.isTrusted();
}
private void launchAssistLongPressAction() {
@@ -5342,7 +5345,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
} else if (mDismissKeyguard != DISMISS_KEYGUARD_NONE) {
mKeyguardHidden = false;
- if (setKeyguardOccludedLw(false)) {
+ final boolean trusted = mKeyguardDelegate.isTrusted();
+ if (trusted) {
+ // No need to un-occlude keyguard - we'll dimiss it right away anyways.
+ } else if (setKeyguardOccludedLw(false)) {
changes |= FINISH_LAYOUT_REDO_LAYOUT
| FINISH_LAYOUT_REDO_CONFIG
| FINISH_LAYOUT_REDO_WALLPAPER;
@@ -5352,7 +5358,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mHandler.post(new Runnable() {
@Override
public void run() {
- mKeyguardDelegate.dismiss(false /* allowWhileOccluded */);
+ mKeyguardDelegate.dismiss(trusted /* allowWhileOccluded */);
}
});
}