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

Commit 7046b2c9 authored by Lyn Han's avatar Lyn Han Committed by Automerger Merge Worker
Browse files

Merge "Enable QS open while notifications are scrolled below status bar" into...

Merge "Enable QS open while notifications are scrolled below status bar" into sc-dev am: bc014c2d am: 3a5a6096

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14941590

Change-Id: I6f345475e37917367b9c6ee2e653d1d8fb3f3991
parents ed25c776 3a5a6096
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4550,6 +4550,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    public void setQsExpansionFraction(float qsExpansionFraction) {
        mQsExpansionFraction = qsExpansionFraction;

        // If notifications are scrolled,
        // clear out scrollY by the time we push notifications offscreen
        if (mOwnScrollY > 0) {
            setOwnScrollY((int) MathUtils.lerp(mOwnScrollY, 0, mQsExpansionFraction));
        }
    }

    @ShadeViewRefactor(RefactorComponent.COORDINATOR)
+2 −1
Original line number Diff line number Diff line
@@ -2213,8 +2213,9 @@ public class NotificationPanelViewController extends PanelViewController {
    }

    private void updateQSExpansionEnabledAmbient() {
        final float scrollRangeToTop = mAmbientState.getTopPadding() - mQuickQsOffsetHeight;
        mQsExpansionEnabledAmbient =
                mAmbientState.getScrollY() <= 0 && !mAmbientState.isShadeOpening();
                mAmbientState.getScrollY() <= scrollRangeToTop && !mAmbientState.isShadeOpening();
        setQsExpansionEnabled();
    }