diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-04-03 16:12:54 +0200 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2014-04-05 17:05:56 +0200 |
commit | 0bed7f258ba1fffc10f986ee043b769f1fd40ad3 (patch) | |
tree | 4bd0086011bcb93b6ad97bba121d2111429c14aa /packages | |
parent | 649b7081dfb1647bd121dfc476f353bd1c799997 (diff) | |
download | frameworks_base-0bed7f258ba1fffc10f986ee043b769f1fd40ad3.zip frameworks_base-0bed7f258ba1fffc10f986ee043b769f1fd40ad3.tar.gz frameworks_base-0bed7f258ba1fffc10f986ee043b769f1fd40ad3.tar.bz2 |
Always go through bouncer when unlocking
Previously, we skipped the bouncer when the user didn't had a
security method set. Users without a security method couldn't unlock
their SIM cards though. This change moves the responsibility to
decide what to do to bouncer, so SIM pin is still shown with users
without secrity methods. The bouncer will still be skipped if no
authentication is required.
Bug: 13635952
Change-Id: I0b43628c37d769515e97c29fc5fb5337fe46526f
Diffstat (limited to 'packages')
3 files changed, 12 insertions, 9 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java index d3a5941..2ea8f85 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java @@ -120,9 +120,11 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa /** * Dismisses the keyguard by going to the next screen or making it gone. + * + * @return True if the keyguard is done. */ - public void dismiss() { - dismiss(false); + public boolean dismiss() { + return dismiss(false); } private void setBackButtonEnabled(boolean enabled) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java index d7a9e07..11ccf2e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java @@ -60,8 +60,13 @@ public class KeyguardBouncer { public void show() { ensureView(); - mRoot.setVisibility(View.VISIBLE); - mKeyguardView.requestFocus(); + + // Try to dismiss the Keyguard. If no security pattern is set, this will dismiss the whole + // Keyguard. If we need to authenticate, show the bouncer. + if (!mKeyguardView.dismiss()) { + mRoot.setVisibility(View.VISIBLE); + mKeyguardView.requestFocus(); + } } public void hide() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index d6bc056..73fc466 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -155,11 +155,7 @@ public class StatusBarKeyguardViewManager { */ public void dismiss() { if (mScreenOn) { - if (mLockPatternUtils.isSecure()) { - showBouncer(); - } else { - mViewMediatorCallback.keyguardDone(false); - } + showBouncer(); } } |