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

Commit 18dfc2fb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix stale NSSL "fling" state caused by no-op fling" into tm-qpr-dev

parents b1d41af4 369571a4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -599,9 +599,7 @@ public abstract class PanelViewController {
            float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) {
        if (target == mExpandedHeight && mOverExpansion == 0.0f) {
            // We're at the target and didn't fling and there's no overshoot
            endJankMonitoring(CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE);
            mKeyguardStateController.notifyPanelFlingEnd();
            notifyExpandingFinished();
            onFlingEnd(false /* cancelled */);
            return;
        }
        mIsFlinging = true;
+15 −0
Original line number Diff line number Diff line
@@ -985,6 +985,21 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
        verify(mKeyguardStateController).notifyPanelFlingEnd();
    }

    @Test
    public void testSwipe_exactlyToTarget_notifiesNssl() {
        // No over-expansion
        mNotificationPanelViewController.setOverExpansion(0f);
        // Fling to a target that is equal to the current position (i.e. a no-op fling).
        mNotificationPanelViewController.flingToHeight(
                0f,
                true,
                mNotificationPanelViewController.mExpandedHeight,
                1f,
                false);
        // Verify that the NSSL is notified that the panel is *not* flinging.
        verify(mNotificationStackScrollLayoutController).setPanelFlinging(false);
    }

    @Test
    public void testDoubleTapRequired_Keyguard() {
        FalsingManager.FalsingTapListener listener = getFalsingTapListener();