Merge "Fix missing KeyguardStatusView after cancelling fps login" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
196dc4a67a
@@ -3772,6 +3772,9 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
||||
});
|
||||
} else if (mDozing && !unlocking) {
|
||||
mScrimController.transitionTo(ScrimState.AOD);
|
||||
// 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 (mKeyguardStateController.isShowing() && !isOccluded() && !unlocking) {
|
||||
mScrimController.transitionTo(ScrimState.KEYGUARD);
|
||||
} else if (mKeyguardStateController.isShowing() && mKeyguardUpdateMonitor.isDreaming()
|
||||
|
||||
@@ -1009,6 +1009,18 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
||||
verify(mScrimController).transitionTo(eq(ScrimState.KEYGUARD));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetDozingNotUnlocking_transitionToAOD_cancelKeyguardFadingAway() {
|
||||
setDozing(true);
|
||||
when(mKeyguardStateController.isShowing()).thenReturn(false);
|
||||
when(mKeyguardStateController.isKeyguardFadingAway()).thenReturn(true);
|
||||
|
||||
mCentralSurfaces.updateScrimController();
|
||||
|
||||
verify(mScrimController, times(2)).transitionTo(eq(ScrimState.AOD));
|
||||
verify(mStatusBarKeyguardViewManager).onKeyguardFadedAway();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShowKeyguardImplementation_setsState() {
|
||||
when(mLockscreenUserManager.getCurrentProfiles()).thenReturn(new SparseArray<>());
|
||||
|
||||
Reference in New Issue
Block a user