summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
diff options
context:
space:
mode:
authorBeverly <beverlyt@google.com>2021-04-27 13:46:36 -0400
committerBeverly <beverlyt@google.com>2021-04-27 16:55:47 -0400
commita95ecb0206cff750a2bf96610f37ccb50988108f (patch)
tree3421c90189cbf387b0da613de3019f1ed8331656 /packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
parent2e7c07e699ca1d7e41f0fb4dc69e43fd4aa2184d (diff)
Don't show udfps disabled after biometric auth
The running state of fingerprint/face-auth changes before the keyguard callbacks get called (ie: isKeyguardGoingAway / isKeyguardShowing), so we need to double check whether the user has used biometrics to authenticate to determine whether to show the grey circle. Remove unused layout disabled_udfps_view. Test: manual, atest SystemUITests Fixes: 185951882 Change-Id: I573926059452037a639fd29838f43f277736819c
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/LockIconViewController.java31
1 files changed, 25 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index 9b0ae6b6b4c5..b5f2ab213559 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -83,6 +83,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
private boolean mQsExpanded;
private int mStatusBarState;
private boolean mIsKeyguardShowing;
+ private boolean mUserUnlockedWithBiometric;
private boolean mShowButton;
private boolean mShowUnlockIcon;
@@ -155,7 +156,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
mView.setLocation(new PointF(props[0], props[1]), props[2]);
}
- mIsKeyguardShowing = mKeyguardViewController.isShowing();
+ updateKeyguardShowing();
+ mUserUnlockedWithBiometric = false;
mIsBouncerShowing = mKeyguardViewController.isBouncerShowing();
mIsDozing = mStatusBarStateController.isDozing();
mRunningFPS = mKeyguardUpdateMonitor.isFingerprintDetectionRunning();
@@ -216,7 +218,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
// these three states are mutually exclusive:
- mShowButton = mUdfpsEnrolled && !mCanDismissLockScreen && !mRunningFPS && isLockScreen();
+ mShowButton = mUdfpsEnrolled && !mCanDismissLockScreen && !mRunningFPS
+ && !mUserUnlockedWithBiometric && isLockScreen();
mShowUnlockIcon = mFaceAuthEnrolled & mCanDismissLockScreen && isLockScreen();
mShowLockIcon = !mUdfpsEnrolled && !mCanDismissLockScreen && isLockScreen()
&& mFaceAuthEnrolled;
@@ -289,6 +292,11 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
}
+ private void updateKeyguardShowing() {
+ mIsKeyguardShowing = mKeyguardStateController.isShowing()
+ && !mKeyguardStateController.isKeyguardGoingAway();
+ }
+
@Override
public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) {
pw.println(" mShowBouncerButton: " + mShowButton);
@@ -300,6 +308,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
pw.println(" mIsKeyguardShowing: " + mIsKeyguardShowing);
pw.println(" mIsDozing: " + mIsDozing);
pw.println(" mIsBouncerShowing: " + mIsBouncerShowing);
+ pw.println(" mUserUnlockedWithBiometric: " + mUserUnlockedWithBiometric);
pw.println(" mRunningFPS: " + mRunningFPS);
pw.println(" mCanDismissLockScreen: " + mCanDismissLockScreen);
pw.println(" mStatusBarState: " + StatusBarState.toShortString(mStatusBarState));
@@ -326,18 +335,20 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
@Override
public void onKeyguardBouncerChanged(boolean bouncer) {
mIsBouncerShowing = bouncer;
- mIsKeyguardShowing = mKeyguardStateController.isShowing();
updateVisibility();
}
@Override
public void onBiometricRunningStateChanged(boolean running,
BiometricSourceType biometricSourceType) {
+ mUserUnlockedWithBiometric =
+ mKeyguardUpdateMonitor.getUserUnlockedWithBiometric(
+ KeyguardUpdateMonitor.getCurrentUser());
+
if (biometricSourceType == FINGERPRINT) {
mRunningFPS = running;
+ updateVisibility();
}
-
- updateVisibility();
}
};
@@ -346,15 +357,23 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
@Override
public void onUnlockedChanged() {
mCanDismissLockScreen = mKeyguardStateController.canDismissLockScreen();
+ updateKeyguardShowing();
updateVisibility();
}
+
@Override
public void onKeyguardShowingChanged() {
- mIsKeyguardShowing = mKeyguardStateController.isShowing();
+ updateKeyguardShowing();
mUdfpsEnrolled = mKeyguardUpdateMonitor.isUdfpsEnrolled();
mFaceAuthEnrolled = mKeyguardUpdateMonitor.isFaceEnrolled();
updateVisibility();
}
+
+ @Override
+ public void onKeyguardFadingAwayChanged() {
+ updateKeyguardShowing();
+ updateVisibility();
+ }
};
private final AccessibilityManager.TouchExplorationStateChangeListener