Merge "Stop face auth when bouncerWillBeShown instead of bouncerFullyShown" into tm-qpr-dev

This commit is contained in:
Chandru S
2022-09-06 17:23:58 +00:00
committed by Android (Google) Code Review
4 changed files with 11 additions and 3 deletions

View File

@@ -52,6 +52,7 @@ data class KeyguardFaceListenModel(
val becauseCannotSkipBouncer: Boolean, val becauseCannotSkipBouncer: Boolean,
val biometricSettingEnabledForUser: Boolean, val biometricSettingEnabledForUser: Boolean,
val bouncerFullyShown: Boolean, val bouncerFullyShown: Boolean,
val bouncerIsOrWillShow: Boolean,
val faceAuthenticated: Boolean, val faceAuthenticated: Boolean,
val faceDisabled: Boolean, val faceDisabled: Boolean,
val goingToSleep: Boolean, val goingToSleep: Boolean,

View File

@@ -2494,7 +2494,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
// on bouncer if both fp and fingerprint are enrolled. // on bouncer if both fp and fingerprint are enrolled.
final boolean awakeKeyguardExcludingBouncerShowing = mKeyguardIsVisible final boolean awakeKeyguardExcludingBouncerShowing = mKeyguardIsVisible
&& mDeviceInteractive && !mGoingToSleep && mDeviceInteractive && !mGoingToSleep
&& !statusBarShadeLocked && !mBouncerFullyShown; && !statusBarShadeLocked && !mBouncerIsOrWillBeShowing;
final int user = getCurrentUser(); final int user = getCurrentUser();
final int strongAuth = mStrongAuthTracker.getStrongAuthForUser(user); final int strongAuth = mStrongAuthTracker.getStrongAuthForUser(user);
final boolean isLockDown = final boolean isLockDown =
@@ -2563,6 +2563,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
becauseCannotSkipBouncer, becauseCannotSkipBouncer,
biometricEnabledForUser, biometricEnabledForUser,
mBouncerFullyShown, mBouncerFullyShown,
mBouncerIsOrWillBeShowing,
faceAuthenticated, faceAuthenticated,
faceDisabledForUser, faceDisabledForUser,
mGoingToSleep, mGoingToSleep,
@@ -3131,7 +3132,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
cb.onKeyguardBouncerStateChanged(mBouncerIsOrWillBeShowing); cb.onKeyguardBouncerStateChanged(mBouncerIsOrWillBeShowing);
} }
} }
updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE);
} }
if (wasBouncerFullyShown != mBouncerFullyShown) { if (wasBouncerFullyShown != mBouncerFullyShown) {

View File

@@ -86,6 +86,7 @@ private fun faceModel(user: Int) = KeyguardFaceListenModel(
becauseCannotSkipBouncer = false, becauseCannotSkipBouncer = false,
biometricSettingEnabledForUser = false, biometricSettingEnabledForUser = false,
bouncerFullyShown = false, bouncerFullyShown = false,
bouncerIsOrWillShow = false,
onlyFaceEnrolled = false, onlyFaceEnrolled = false,
faceAuthenticated = false, faceAuthenticated = false,
faceDisabled = false, faceDisabled = false,

View File

@@ -1511,7 +1511,7 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
anyBoolean()); anyBoolean());
CancellationSignal cancelSignal = mCancellationSignalCaptor.getValue(); CancellationSignal cancelSignal = mCancellationSignalCaptor.getValue();
bouncerFullyVisible(); bouncerWillBeVisibleSoon();
mTestableLooper.processAllMessages(); mTestableLooper.processAllMessages();
assertThat(cancelSignal.isCanceled()).isTrue(); assertThat(cancelSignal.isCanceled()).isTrue();
@@ -1669,6 +1669,11 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase {
setKeyguardBouncerVisibility(true); setKeyguardBouncerVisibility(true);
} }
private void bouncerWillBeVisibleSoon() {
mKeyguardUpdateMonitor.sendKeyguardBouncerChanged(true, false);
mTestableLooper.processAllMessages();
}
private void setKeyguardBouncerVisibility(boolean isVisible) { private void setKeyguardBouncerVisibility(boolean isVisible) {
mKeyguardUpdateMonitor.sendKeyguardBouncerChanged(isVisible, isVisible); mKeyguardUpdateMonitor.sendKeyguardBouncerChanged(isVisible, isVisible);
mTestableLooper.processAllMessages(); mTestableLooper.processAllMessages();