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

Commit cf4f4416 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Fixing shade not collapsing after rotating from split shade

Issue was happening because when swiping to overscroll, mExpandImmediate in QS was set to true and was never reset. It should be true only when QS are in motion so the solution is to reset it after any motion is finished. Calling setExpandImmediate() twice is safe because if value doesn't change it doesn't do anything.

Bug: 282095041
Test: Open split shade -> scroll down to do overscrolling -> rotate to portrait -> QS should be collapsed
Test: NotificationPanelViewControllerTest#onShadeFlingEnd_mExpandImmediateShouldBeReset
Test: e2e test: SplitNotificationShadeRotateToPortrait
Change-Id: I0663bc28a48b2092546a2cb9a99993320fb7c8e4
parent 75c52789
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2001,6 +2001,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        }
        updateExpansionAndVisibility();
        mNotificationStackScrollLayoutController.setPanelFlinging(false);
        // expandImmediate should be always reset at the end of animation
        mQsController.setExpandImmediate(false);
    }

    private boolean isInContentBounds(float x, float y) {
+7 −0
Original line number Diff line number Diff line
@@ -1089,6 +1089,13 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        inOrder.verify(mNotificationStackScrollLayoutController).onExpansionStopped();
    }

    @Test
    public void onShadeFlingEnd_mExpandImmediateShouldBeReset() {
        mNotificationPanelViewController.onFlingEnd(false);

        verify(mQsController).setExpandImmediate(false);
    }

    @Test
    public void inUnlockedSplitShade_transitioningMaxTransitionDistance_makesShadeFullyExpanded() {
        mStatusBarStateController.setState(SHADE);