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

Commit 51a6f525 authored by Shawn Lee's avatar Shawn Lee Committed by Android (Google) Code Review
Browse files

Merge "Only reset mExpectingSynthesizedDown once expansion actually starts" into main

parents ef61a0eb f805a24f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2220,6 +2220,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
    @VisibleForTesting
    void onFlingEnd(boolean cancelled) {
        mIsFlinging = false;
        mExpectingSynthesizedDown = false;
        // No overshoot when the animation ends
        setOverExpansionInternal(0, false /* isFromGesture */);
        setAnimator(null);
@@ -2352,7 +2353,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
            return;
        }
        if (mExpectingSynthesizedDown) {
            mExpectingSynthesizedDown = false;
            // Window never will receive touch events that typically trigger haptic on open.
            maybeVibrateOnOpening(false /* openingWithTouch */);
            fling(velocity > 1f ? 1000f * velocity : 0  /* expand */);
@@ -3994,6 +3994,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
            }
            mExpandedFraction = Math.min(1f,
                    maxPanelHeight == 0 ? 0 : mExpandedHeight / maxPanelHeight);
            if (mExpandedFraction > 0f && mExpectingSynthesizedDown) {
                mExpectingSynthesizedDown = false;
            }
            mShadeRepository.setLegacyShadeExpansion(mExpandedFraction);
            mQsController.setShadeExpansion(mExpandedHeight, mExpandedFraction);
            mExpansionDragDownAmountPx = h;