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

Commit 5a3da80f authored by Matt Pietal's avatar Matt Pietal
Browse files

Fix shade over occluded activity

A recent change was showing the bouncer when swiping down to view the
shade over an occluding activity like camera. Make sure the bouncer is
not directed to display when receiving these panel expansion events.

Fixes: 260199818
Test: atest StatusBarKeyguardViewManagerTest
Test: manual - use occluding activities and test shade and bouncer swipes
Change-Id: Iab69c6f33e20ba337bf659ad7ad9eea774988ae5
parent afcfb91d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -469,6 +469,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
            // Don't expand to the bouncer. Instead transition back to the lock screen (see
            // Don't expand to the bouncer. Instead transition back to the lock screen (see
            // CentralSurfaces#showBouncerOrLockScreenIfKeyguard)
            // CentralSurfaces#showBouncerOrLockScreenIfKeyguard)
            return;
            return;
        } else if (mKeyguardStateController.isOccluded()
                && !mDreamOverlayStateController.isOverlayActive()) {
            return;
        } else if (needsFullscreenBouncer()) {
        } else if (needsFullscreenBouncer()) {
            if (mPrimaryBouncer != null) {
            if (mPrimaryBouncer != null) {
                mPrimaryBouncer.setExpansion(KeyguardBouncer.EXPANSION_VISIBLE);
                mPrimaryBouncer.setExpansion(KeyguardBouncer.EXPANSION_VISIBLE);
+11 −0
Original line number Original line Diff line number Diff line
@@ -306,6 +306,17 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
        verify(mPrimaryBouncer, never()).setExpansion(anyFloat());
        verify(mPrimaryBouncer, never()).setExpansion(anyFloat());
    }
    }


    @Test
    public void onPanelExpansionChanged_neverTranslatesBouncerWhenOccluded() {
        when(mKeyguardStateController.isOccluded()).thenReturn(true);
        mStatusBarKeyguardViewManager.onPanelExpansionChanged(
                expansionEvent(
                        /* fraction= */ KeyguardBouncer.EXPANSION_VISIBLE,
                        /* expanded= */ true,
                        /* tracking= */ false));
        verify(mPrimaryBouncer, never()).setExpansion(anyFloat());
    }

    @Test
    @Test
    public void onPanelExpansionChanged_neverTranslatesBouncerWhenShowBouncer() {
    public void onPanelExpansionChanged_neverTranslatesBouncerWhenShowBouncer() {
        // Since KeyguardBouncer.EXPANSION_VISIBLE = 0 panel expansion, if the unlock is dismissing
        // Since KeyguardBouncer.EXPANSION_VISIBLE = 0 panel expansion, if the unlock is dismissing