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

Commit 1ed67603 authored by András Kurucz's avatar András Kurucz
Browse files

[Flexiglass] Turn off SCOLL_FLING CUJ tracking from the NSSL

Disable tracking CUJ_NOTIFICATION_SHADE_SCROLL_FLING events from the
NSSL and NSSLC, because moving the stack updown by scrolling,
overscrolling or flinging is now controlled through the Placeholders.

This CL also flags off some bigger junks of the remaining scroll logic.

Bug: 360100111
Test: verify that the new assertions are not hit with flexi on
Flag: com.android.systemui.scene_container
Change-Id: I88a7aab43980c5c42138ea0b7e4523fb15648bdc
parent d2ade5c3
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ import android.util.AttributeSet;
import android.util.IndentingPrintWriter;
import android.util.Log;
import android.util.MathUtils;
import android.util.Pair;
import android.view.DisplayCutout;
import android.view.InputDevice;
import android.view.LayoutInflater;
@@ -141,7 +140,6 @@ import com.android.systemui.statusbar.notification.stack.ui.view.NotificationScr
import com.android.systemui.statusbar.phone.HeadsUpAppearanceController;
import com.android.systemui.statusbar.policy.ScrollAdapter;
import com.android.systemui.statusbar.policy.SplitShadeStateController;
import com.android.systemui.statusbar.ui.SystemBarUtilsProxy;
import com.android.systemui.util.Assert;
import com.android.systemui.util.ColorUtilKt;
import com.android.systemui.util.DumpUtilsKt;
@@ -2253,6 +2251,7 @@ public class NotificationStackScrollLayout
    }

    public void setFinishScrollingCallback(Runnable runnable) {
        SceneContainerFlag.assertInLegacyMode();
        mFinishScrollingCallback = runnable;
    }

@@ -2763,6 +2762,8 @@ public class NotificationStackScrollLayout
     *                  which means we want to scroll towards the top.
     */
    protected void fling(int velocityY) {
        // Scrolls and flings are handled by the Composables with SceneContainer enabled
        SceneContainerFlag.assertInLegacyMode();
        if (getChildCount() > 0) {
            float topAmount = getCurrentOverScrollAmount(true);
            float bottomAmount = getCurrentOverScrollAmount(false);
@@ -3857,7 +3858,10 @@ public class NotificationStackScrollLayout
                }
                break;
            case ACTION_UP:
                if (mIsBeingDragged) {
                if (SceneContainerFlag.isEnabled() && mIsBeingDragged) {
                    mActivePointerId = INVALID_POINTER;
                    endDrag();
                } else if (mIsBeingDragged) {
                    final VelocityTracker velocityTracker = mVelocityTracker;
                    velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
                    int initialVelocity = (int) velocityTracker.getYVelocity(mActivePointerId);
@@ -3920,6 +3924,7 @@ public class NotificationStackScrollLayout
    }

    boolean isFlingAfterUpEvent() {
        SceneContainerFlag.assertInLegacyMode();
        return mFlingAfterUpEvent;
    }

+4 −2
Original line number Diff line number Diff line
@@ -2059,7 +2059,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
            // We log any touches other than down, which will be captured by onTouchEvent.
            // In the intercept we only start tracing when it's not a down (otherwise that down
            // would be duplicated when intercepted).
            if (mJankMonitor != null && scrollWantsIt
            if (!SceneContainerFlag.isEnabled() && mJankMonitor != null && scrollWantsIt
                    && ev.getActionMasked() != MotionEvent.ACTION_DOWN) {
                mJankMonitor.begin(mView, CUJ_NOTIFICATION_SHADE_SCROLL_FLING);
            }
@@ -2140,7 +2140,9 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                }
                mView.setCheckForLeaveBehind(true);
            }
            if (!SceneContainerFlag.isEnabled()) {
                traceJankOnTouchEvent(ev.getActionMasked(), scrollerWantsIt);
            }
            return horizontalSwipeWantsIt || scrollerWantsIt || expandWantsIt || longPressWantsIt
                    || hunWantsIt;
        }