diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 408c61f8f387d..aa04194e84b2b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -1183,7 +1183,8 @@ public class KeyguardIndicationController { return ((!updateMonitor.isUnlockingWithBiometricAllowed(true /* isStrongBiometric */) && msgId != FingerprintManager.FINGERPRINT_ERROR_LOCKOUT_PERMANENT) || msgId == FingerprintManager.FINGERPRINT_ERROR_CANCELED - || msgId == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED); + || msgId == FingerprintManager.FINGERPRINT_ERROR_USER_CANCELED + || msgId == FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED); } private boolean shouldSuppressFaceError(int msgId, KeyguardUpdateMonitor updateMonitor) { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java index ac8874b0e1317..39214dd37e2a0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java @@ -628,6 +628,19 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase { verifyNoMessage(INDICATION_TYPE_TRANSIENT); } + @Test + public void transientIndication_visibleWhenDozing_ignoresPowerPressed() { + createController(); + + mController.setVisible(true); + reset(mRotateTextViewController); + mController.getKeyguardCallback().onBiometricError( + FingerprintManager.BIOMETRIC_ERROR_POWER_PRESSED, "foo", + BiometricSourceType.FINGERPRINT); + + verifyNoMessage(INDICATION_TYPE_BIOMETRIC_MESSAGE); + } + @Test public void transientIndication_swipeUpToRetry() { createController();