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

Commit 625756be authored by Michał Brzeziński's avatar Michał Brzeziński Committed by Android (Google) Code Review
Browse files

Merge "Fixing SysUI reporting expanded split shade state to launcher" into tm-qpr-dev

parents ebc8b51a 19f7e7c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5035,7 +5035,7 @@ public final class NotificationPanelViewController {
    }

    public boolean isFullyExpanded() {
        return mExpandedHeight >= getMaxPanelHeight();
        return mExpandedHeight >= getMaxPanelTransitionDistance();
    }

    public boolean isFullyCollapsed() {
+9 −0
Original line number Diff line number Diff line
@@ -1680,6 +1680,15 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
        inOrder.verify(mNotificationStackScrollLayoutController).onExpansionStopped();
    }

    @Test
    public void inUnlockedSplitShade_transitioningMaxTransitionDistance_makesShadeFullyExpanded() {
        mStatusBarStateController.setState(SHADE);
        enableSplitShade(true);
        int transitionDistance = mNotificationPanelViewController.getMaxPanelTransitionDistance();
        mNotificationPanelViewController.setExpandedHeight(transitionDistance);
        assertThat(mNotificationPanelViewController.isFullyExpanded()).isTrue();
    }

    private static MotionEvent createMotionEvent(int x, int y, int action) {
        return MotionEvent.obtain(
                /* downTime= */ 0, /* eventTime= */ 0, action, x, y, /* metaState= */ 0);