Supress fingerprint cancellation messages in lock screen.
Fix: 185208300 Test: atest com.android.systemui.statusbar.KeyguardIndicationControllerTest Test: manually on device Change-Id: I0b383f86ff09be82160bc7f279d15b484d047559
This commit is contained in:
@@ -924,7 +924,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal
|
||||
// check of whether non-strong biometric is allowed
|
||||
return ((!updateMonitor.isUnlockingWithBiometricAllowed(true /* isStrongBiometric */)
|
||||
&& msgId != FingerprintManager.FINGERPRINT_ERROR_LOCKOUT_PERMANENT)
|
||||
|| msgId == FingerprintManager.FINGERPRINT_ERROR_CANCELED);
|
||||
|| msgId == FingerprintManager.FINGERPRINT_ERROR_CANCELED
|
||||
|| msgId == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED);
|
||||
}
|
||||
|
||||
private boolean shouldSuppressFaceError(int msgId, KeyguardUpdateMonitor updateMonitor) {
|
||||
|
||||
@@ -473,6 +473,22 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {
|
||||
assertThat(mTextView.getText()).isNotEqualTo(message);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void transientIndication_visibleWhenDozing_ignoresFingerprintCancellation() {
|
||||
createController();
|
||||
|
||||
mController.setVisible(true);
|
||||
reset(mRotateTextViewController);
|
||||
mController.getKeyguardCallback().onBiometricError(
|
||||
FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED, "foo",
|
||||
BiometricSourceType.FINGERPRINT);
|
||||
mController.getKeyguardCallback().onBiometricError(
|
||||
FingerprintManager.FINGERPRINT_ERROR_CANCELED, "bar",
|
||||
BiometricSourceType.FINGERPRINT);
|
||||
|
||||
verifyNoTransientMessage();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void transientIndication_swipeUpToRetry() {
|
||||
createController();
|
||||
@@ -668,4 +684,8 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {
|
||||
private void verifyTransientMessage(String message) {
|
||||
verify(mRotateTextViewController).showTransient(eq(message), anyBoolean());
|
||||
}
|
||||
|
||||
private void verifyNoTransientMessage() {
|
||||
verify(mRotateTextViewController, never()).showTransient(any(), anyBoolean());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user