diff options
| author | Daniel Sandler <dsandler@android.com> | 2012-11-07 15:07:12 -0500 |
|---|---|---|
| committer | Daniel Sandler <dsandler@android.com> | 2012-11-07 16:38:21 -0500 |
| commit | 1ce804397fbd1fb9847d42f42294babea724ccf2 (patch) | |
| tree | 65c4aeb696dd7dc7fde3cd013a069c2e182d48f8 | |
| parent | b524f4b928fe3ac9c71657a323cff4b3321344da (diff) | |
| download | frameworks_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-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 16 |
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(); } - }); - } + } + }); } } |
