Merge "Don't delay bouncer if face + fp enrolled" into tm-d1-dev
This commit is contained in:
@@ -216,9 +216,12 @@ public class KeyguardBouncer {
|
|||||||
|
|
||||||
// Split up the work over multiple frames.
|
// Split up the work over multiple frames.
|
||||||
DejankUtils.removeCallbacks(mResetRunnable);
|
DejankUtils.removeCallbacks(mResetRunnable);
|
||||||
if (mKeyguardStateController.isFaceAuthEnabled() && !needsFullscreenBouncer()
|
if (mKeyguardStateController.isFaceAuthEnabled()
|
||||||
&& !mKeyguardUpdateMonitor.userNeedsStrongAuth()
|
&& !mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible(
|
||||||
&& !mKeyguardBypassController.getBypassEnabled()) {
|
KeyguardUpdateMonitor.getCurrentUser())
|
||||||
|
&& !needsFullscreenBouncer()
|
||||||
|
&& !mKeyguardUpdateMonitor.userNeedsStrongAuth()
|
||||||
|
&& !mKeyguardBypassController.getBypassEnabled()) {
|
||||||
mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY);
|
mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY);
|
||||||
} else {
|
} else {
|
||||||
DejankUtils.postAfterTraversal(mShowRunnable);
|
DejankUtils.postAfterTraversal(mShowRunnable);
|
||||||
|
|||||||
@@ -399,9 +399,8 @@ 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
|
@Test
|
||||||
public void testShow_delaysIfFaceAuthIsRunning_unlessBypass() {
|
public void testShow_delaysIfFaceAuthIsRunning_unlessBypassEnabled() {
|
||||||
when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true);
|
when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true);
|
||||||
when(mKeyguardBypassController.getBypassEnabled()).thenReturn(true);
|
when(mKeyguardBypassController.getBypassEnabled()).thenReturn(true);
|
||||||
mBouncer.show(true /* reset */);
|
mBouncer.show(true /* reset */);
|
||||||
@@ -409,6 +408,16 @@ public class KeyguardBouncerTest extends SysuiTestCase {
|
|||||||
verify(mHandler, never()).postDelayed(any(), anyLong());
|
verify(mHandler, never()).postDelayed(any(), anyLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testShow_delaysIfFaceAuthIsRunning_unlessFingerprintEnrolled() {
|
||||||
|
when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true);
|
||||||
|
when(mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible(0))
|
||||||
|
.thenReturn(true);
|
||||||
|
mBouncer.show(true /* reset */);
|
||||||
|
|
||||||
|
verify(mHandler, never()).postDelayed(any(), anyLong());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRegisterUpdateMonitorCallback() {
|
public void testRegisterUpdateMonitorCallback() {
|
||||||
verify(mKeyguardUpdateMonitor).registerCallback(any());
|
verify(mKeyguardUpdateMonitor).registerCallback(any());
|
||||||
|
|||||||
Reference in New Issue
Block a user