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

Commit 73661955 authored by András Kurucz's avatar András Kurucz
Browse files

[Flexiglass] Disable forced scrolling the NSSL

This was a non-functional code path in the NSSL, because it cannot
control its own scrolling anymore. So the _scroll to active remote
input_ was not workign before this change either.

Bug: 360091533
Test: activate remote input on a notification -> no crashes
Flag: com.android.systemui.scene_container
Change-Id: I33b9e0da787f7517e6127b26919da8b40aeb7f84
parent 548fed5e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -790,7 +790,6 @@ public class NotificationStackScrollLayout
    private void onJustBeforeDraw() {
        if (SceneContainerFlag.isEnabled()) {
            if (mChildrenUpdateRequested) {
                updateForcedScroll();
                updateChildren();
                mChildrenUpdateRequested = false;
            }
@@ -1969,7 +1968,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;
@@ -1977,6 +1977,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);
@@ -1998,6 +2002,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());