Fix other reproduction of invisible keyguard race
Similar to Id20a300edfa52433642747dbcdb1ecceeffadba8, the keyguard becomes invisible after the keyguard erronously enters a bad state due to racing unlock and lock requests from the user. This corrects it for this reproduction by cancelling the inprogress unlock animation. Bug: 267711359 Test: Manually tested on device Change-Id: I6985a667827ac068af8e2eb5756edc30f7545cd9
This commit is contained in:
@@ -3753,6 +3753,9 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
||||
} else {
|
||||
mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED);
|
||||
}
|
||||
// This will cancel the keyguardFadingAway animation if it is running. We need to do
|
||||
// this as otherwise it can remain pending and leave keyguard in a weird state.
|
||||
mUnlockScrimCallback.onCancelled();
|
||||
} else if (mBouncerShowing && !unlocking) {
|
||||
// Bouncer needs the front scrim when it's on top of an activity,
|
||||
// tapping on a notification, editing QS or being dismissed by
|
||||
|
||||
@@ -1021,6 +1021,17 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
||||
verify(mStatusBarKeyguardViewManager).onKeyguardFadedAway();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetDozingNotUnlocking_transitionToAuthScrimmed_cancelKeyguardFadingAway() {
|
||||
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true);
|
||||
when(mKeyguardStateController.isKeyguardFadingAway()).thenReturn(true);
|
||||
|
||||
mCentralSurfaces.updateScrimController();
|
||||
|
||||
verify(mScrimController).transitionTo(eq(ScrimState.AUTH_SCRIMMED_SHADE));
|
||||
verify(mStatusBarKeyguardViewManager).onKeyguardFadedAway();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShowKeyguardImplementation_setsState() {
|
||||
when(mLockscreenUserManager.getCurrentProfiles()).thenReturn(new SparseArray<>());
|
||||
|
||||
Reference in New Issue
Block a user