Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c43a2d22 authored by Hawkwood Glazier's avatar Hawkwood Glazier Committed by Automerger Merge Worker
Browse files

Merge "Fix other reproduction of invisible keyguard race" into tm-qpr-dev am:...

Merge "Fix other reproduction of invisible keyguard race" into tm-qpr-dev am: 2b9ee44d am: db00e56e am: 25acb563 am: d82d3add

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



Change-Id: I5dc856ee2286cb4412c5e8b4da6566c1e435e856
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d7c5b911 d82d3add
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3799,6 +3799,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
+11 −0
Original line number Diff line number Diff line
@@ -1079,6 +1079,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<>());