Merge "Fix missing KeyguardStatusView after cancelling fps login" into tm-qpr-dev am: 196dc4a67a am: 9639e4c20b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20966486

Change-Id: Ib625502974faf55a3eaca1904f66e608f1621873
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hawkwood Glazier
2023-01-27 18:17:04 +00:00
committed by Automerger Merge Worker
2 changed files with 15 additions and 0 deletions

View File

@@ -3773,6 +3773,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()

View File

@@ -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<>());