summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chandru S <chandruis@google.com> 2022-09-15 02:11:42 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-09-15 02:11:42 +0000
commit2807f5a3fd870904257df446e47d82b2f6efd396 (patch)
tree0f55746d098385cade6843c18e822c724c6ad8cd
parent50ab781e1799e0e5cdcc86e3984209d1c437df83 (diff)
parent053d63c08df4f95c10fd25659381cbc89dd57b14 (diff)
Merge "Do not delay bouncer for running face auth if face unlock is locked out." into tm-qpr-dev am: fcbb9f98b8 am: 053d63c08d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19928273 Change-Id: Id117d60fee91800e756db74ce97381a7fa16ffe3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java10
2 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index e63c383b010b..44aef7de4013 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -220,6 +220,7 @@ public class KeyguardBouncer {
&& !mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible(
KeyguardUpdateMonitor.getCurrentUser())
&& !needsFullscreenBouncer()
+ && !mKeyguardUpdateMonitor.isFaceLockedOut()
&& !mKeyguardUpdateMonitor.userNeedsStrongAuth()
&& !mKeyguardBypassController.getBypassEnabled()) {
mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java
index 60a3d95e24f6..ab209d130b2f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java
@@ -408,6 +408,16 @@ public class KeyguardBouncerTest extends SysuiTestCase {
mBouncer.hide(false /* destroyView */);
verify(mHandler).removeCallbacks(eq(showRunnable.getValue()));
}
+
+ @Test
+ public void testShow_doesNotDelaysIfFaceAuthIsLockedOut() {
+ when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true);
+ when(mKeyguardUpdateMonitor.isFaceLockedOut()).thenReturn(true);
+ mBouncer.show(true /* reset */);
+
+ verify(mHandler, never()).postDelayed(any(), anyLong());
+ }
+
@Test
public void testShow_delaysIfFaceAuthIsRunning_unlessBypassEnabled() {
when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true);