diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index 6cb25067ed..6a9abd5455 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -472,6 +472,11 @@ public abstract class RecentsView extends PagedView impl } } + @Override + protected boolean shouldBlockGestures(MotionEvent ev) { + return Utilities.shouldDisableGestures(ev); + } + @Override public boolean onTouchEvent(MotionEvent ev) { super.onTouchEvent(ev); diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 2eeb132bbf..f8e4c9dfc7 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -16,7 +16,6 @@ package com.android.launcher3; -import static com.android.launcher3.Utilities.shouldDisableGestures; import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled; import static com.android.launcher3.compat.AccessibilityManagerCompat.isObservedEventType; import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS; @@ -847,7 +846,7 @@ public abstract class PagedView extends ViewGrou */ // Skip touch handling if there are no pages to swipe - if (getChildCount() <= 0 || shouldDisableGestures(ev)) return false; + if (getChildCount() <= 0 || shouldBlockGestures(ev)) return false; acquireVelocityTrackerAndAddMovement(ev); @@ -1092,10 +1091,14 @@ public abstract class PagedView extends ViewGrou mAllowOverScroll = enable; } + protected boolean shouldBlockGestures(MotionEvent ev) { + return false; + } + @Override public boolean onTouchEvent(MotionEvent ev) { // Skip touch handling if there are no pages to swipe - if (getChildCount() <= 0 || shouldDisableGestures(ev)) return false; + if (getChildCount() <= 0 || shouldBlockGestures(ev)) return false; acquireVelocityTrackerAndAddMovement(ev);