summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
author AndrĂ¡s Kurucz <kurucz@google.com> 2025-03-24 04:38:24 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-24 04:38:24 -0700
commitc674f1332d4a7daaa974792238cc4c7ce9552dac (patch)
tree2328347b3d1a21ee8cab6a7cc32782cb7dbbe3c2 /packages/SystemUI/src
parentcadaad60d9f1437c8cbafdb065058b74490dd60f (diff)
parent1ed67603749c7e4d0ba94ff2cf33f488f4539e97 (diff)
Merge "[Flexiglass] Turn off SCOLL_FLING CUJ tracking from the NSSL" into main
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java6
2 files changed, 12 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index afa988dd8e89..a01e504d47c6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -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;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
index 7ac7905c8a48..db56718e9f22 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -2091,7 +2091,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);
}
@@ -2172,7 +2172,9 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
mView.setCheckForLeaveBehind(true);
}
- traceJankOnTouchEvent(ev.getActionMasked(), scrollerWantsIt);
+ if (!SceneContainerFlag.isEnabled()) {
+ traceJankOnTouchEvent(ev.getActionMasked(), scrollerWantsIt);
+ }
return horizontalSwipeWantsIt || scrollerWantsIt || expandWantsIt || longPressWantsIt
|| hunWantsIt;
}