summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-11-07 15:07:12 -0500
committerDaniel Sandler <dsandler@android.com>2012-11-07 16:38:21 -0500
commit1ce804397fbd1fb9847d42f42294babea724ccf2 (patch)
tree65c4aeb696dd7dc7fde3cd013a069c2e182d48f8
parentb524f4b928fe3ac9c71657a323cff4b3321344da (diff)
downloadframeworks_base-1ce804397fbd1fb9847d42f42294babea724ccf2.zip
frameworks_base-1ce804397fbd1fb9847d42f42294babea724ccf2.tar.gz
frameworks_base-1ce804397fbd1fb9847d42f42294babea724ccf2.tar.bz2
Make dismissKeyguardLw use KeyguardViewMediator.dismiss().
It previously did some of the logic of dismiss() itself: checking to see if the KG is secure, and if not, proceeding to call keyguardDone() to actually hide everything. But now that we have the "bouncer" authentication UI, the WM should let the keyguard challenge the user to see if even a secure keyguard should be dismissed. (Insecure keyguards should behave exactly has they did before.) Unless, of course, the KVM is in a "dismissable" state, in which case it's safe to call keyguardDone() directly. (This can happen if the user has *already* authenticated and we're ending up in this codepath in response.) Bug: 7458531 Change-Id: I9571acf19f9bcc16bba7a826f916da7be8ca9c33
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index d733369..54bf20d 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -3899,14 +3899,18 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
public void dismissKeyguardLw() {
- if (mKeyguardMediator.isDismissable()) {
- if (mKeyguardMediator.isShowing()) {
- mHandler.post(new Runnable() {
- public void run() {
+ if (mKeyguardMediator.isShowing()) {
+ mHandler.post(new Runnable() {
+ public void run() {
+ if (mKeyguardMediator.isDismissable()) {
+ // Can we just finish the keyguard straight away?
mKeyguardMediator.keyguardDone(false, true);
+ } else {
+ // ask the keyguard to prompt the user to authenticate if necessary
+ mKeyguardMediator.dismiss();
}
- });
- }
+ }
+ });
}
}