Merge "Do not delay bouncer for running face auth if face unlock is locked out." into tm-qpr-dev
This commit is contained in:
@@ -220,6 +220,7 @@ public class KeyguardBouncer {
|
|||||||
&& !mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible(
|
&& !mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible(
|
||||||
KeyguardUpdateMonitor.getCurrentUser())
|
KeyguardUpdateMonitor.getCurrentUser())
|
||||||
&& !needsFullscreenBouncer()
|
&& !needsFullscreenBouncer()
|
||||||
|
&& !mKeyguardUpdateMonitor.isFaceLockedOut()
|
||||||
&& !mKeyguardUpdateMonitor.userNeedsStrongAuth()
|
&& !mKeyguardUpdateMonitor.userNeedsStrongAuth()
|
||||||
&& !mKeyguardBypassController.getBypassEnabled()) {
|
&& !mKeyguardBypassController.getBypassEnabled()) {
|
||||||
mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY);
|
mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY);
|
||||||
|
|||||||
@@ -408,6 +408,16 @@ public class KeyguardBouncerTest extends SysuiTestCase {
|
|||||||
mBouncer.hide(false /* destroyView */);
|
mBouncer.hide(false /* destroyView */);
|
||||||
verify(mHandler).removeCallbacks(eq(showRunnable.getValue()));
|
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
|
@Test
|
||||||
public void testShow_delaysIfFaceAuthIsRunning_unlessBypassEnabled() {
|
public void testShow_delaysIfFaceAuthIsRunning_unlessBypassEnabled() {
|
||||||
when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true);
|
when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user