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

Commit b434c70e authored by András Kurucz's avatar András Kurucz Committed by Android (Google) Code Review
Browse files

Merge "[Flexiglass] Disable forced scrolling the NSSL" into main

parents 84bcebb5 73661955
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -789,7 +789,6 @@ public class NotificationStackScrollLayout
    private void onJustBeforeDraw() {
        if (SceneContainerFlag.isEnabled()) {
            if (mChildrenUpdateRequested) {
                updateForcedScroll();
                updateChildren();
                mChildrenUpdateRequested = false;
            }
@@ -1998,7 +1997,8 @@ public class NotificationStackScrollLayout
    }

    public void lockScrollTo(View v) {
        if (mForcedScroll == v) {
        // NSSL shouldn't handle scrolling with SceneContainer enabled.
        if (mForcedScroll == v || SceneContainerFlag.isEnabled()) {
            return;
        }
        mForcedScroll = v;
@@ -2006,6 +2006,10 @@ public class NotificationStackScrollLayout
    }

    public boolean scrollTo(View v) {
        // NSSL shouldn't handle scrolling with SceneContainer enabled.
        if (SceneContainerFlag.isEnabled()) {
            return false;
        }
        ExpandableView expandableView = (ExpandableView) v;
        int positionInLinearLayout = getPositionInLinearLayout(v);
        int targetScroll = targetScrollForView(expandableView, positionInLinearLayout);
@@ -2027,6 +2031,7 @@ public class NotificationStackScrollLayout
     * the IME.
     */
    private int targetScrollForView(ExpandableView v, int positionInLinearLayout) {
        SceneContainerFlag.assertInLegacyMode();
        return positionInLinearLayout + v.getIntrinsicHeight() +
                getImeInset() - getHeight()
                + ((!isExpanded() && isPinnedHeadsUp(v)) ? mHeadsUpInset : getTopPadding());