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

Commit 17975c5e authored by Matt Pietal's avatar Matt Pietal
Browse files

Clear leave shade open on bouncer exit

Various points in the code may set the state to indicate that the
shade should stay open after unlocking. However, if the bouncer
is canceled via back gesture, the flag could remain on.

Fixes: 375969371
Test: atest StatusBarKeyguardViewManagerTest
Flag: EXEMPT bugfix
Change-Id: I973b1532624f12421d223f6241db1fea80d02c94
parent 98b44b0b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -803,6 +803,13 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
        verify(mPrimaryBouncerInteractor).setDismissAction(eq(null), eq(null));
    }

    @Test
    public void onBackPressedResetsLeaveOnKeyguardHide() {
        when(mPrimaryBouncerInteractor.isFullyShowing()).thenReturn(true);
        mStatusBarKeyguardViewManager.onBackPressed();
        verify(mStatusBarStateController).setLeaveOpenOnKeyguardHide(false);
    }

    @Test
    public void testResetHideBouncerWhenShowingIsFalse_alternateBouncerHides() {
        // GIVEN the keyguard is showing
+1 −0
Original line number Diff line number Diff line
@@ -1348,6 +1348,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        if (!canHandleBackPressed()) {
            return;
        }
        mStatusBarStateController.setLeaveOpenOnKeyguardHide(false);

        boolean hideBouncerOverDream = isBouncerShowing()
                && mDreamOverlayStateController.isOverlayActive();