Fixed a bug where a fingerprint animation was not running
Previously the fingerprint animation would not run
when we successfully unlocked with the fingerprint,
because we were checking for the wrong state.
Bug: 22483380
Change-Id: I8d3ec303a43323431b8866df29ddd6d668edc1ed
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
index 66d71f6..6fc15a8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
@@ -39,9 +39,10 @@
/** Whether the user configured a secure unlock method (PIN, password, etc.) */
private boolean mSecure;
/** Whether the unlock method is currently insecure (insecure method or trusted environment) */
- private boolean mCurrentlyInsecure;
+ private boolean mCanSkipBouncer;
private boolean mTrustManaged;
private boolean mFaceUnlockRunning;
+ private boolean mTrusted;
private UnlockMethodCache(Context ctx) {
mLockPatternUtils = new LockPatternUtils(ctx);
@@ -64,11 +65,15 @@
return mSecure;
}
+ public boolean isTrusted() {
+ return mTrusted;
+ }
+
/**
- * @return whether the lockscreen is currently insecure, i. e. the bouncer won't be shown
+ * @return whether the lockscreen is currently insecure, and the bouncer won't be shown
*/
- public boolean isCurrentlyInsecure() {
- return mCurrentlyInsecure;
+ public boolean canSkipBouncer() {
+ return mCanSkipBouncer;
}
public void addListener(OnUnlockMethodChangedListener listener) {
@@ -82,15 +87,17 @@
private void update(boolean updateAlways) {
int user = KeyguardUpdateMonitor.getCurrentUser();
boolean secure = mLockPatternUtils.isSecure(user);
- boolean currentlyInsecure = !secure || mKeyguardUpdateMonitor.getUserHasTrust(user);
+ boolean canSkipBouncer = !secure || mKeyguardUpdateMonitor.getUserCanSkipBouncer(user);
boolean trustManaged = mKeyguardUpdateMonitor.getUserTrustIsManaged(user);
+ boolean trusted = mKeyguardUpdateMonitor.getUserHasTrust(user);
boolean faceUnlockRunning = mKeyguardUpdateMonitor.isFaceUnlockRunning(user)
&& trustManaged;
- boolean changed = secure != mSecure || currentlyInsecure != mCurrentlyInsecure ||
+ boolean changed = secure != mSecure || canSkipBouncer != mCanSkipBouncer ||
trustManaged != mTrustManaged || faceUnlockRunning != mFaceUnlockRunning;
if (changed || updateAlways) {
mSecure = secure;
- mCurrentlyInsecure = currentlyInsecure;
+ mCanSkipBouncer = canSkipBouncer;
+ mTrusted = trusted;
mTrustManaged = trustManaged;
mFaceUnlockRunning = faceUnlockRunning;
notifyListeners();