From a09cfe23403ae7002961dd2cd02f49b338696a4d Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Wed, 22 May 2019 14:16:36 -0700 Subject: [PATCH] Fix issue where AllAppsContainerView was blocking touches to part of the home screen => After the scrubber was engaged, it would continue to intercept touches forever (seems like a long standing issue) => Also fixed issue where the All Apps scrubber could be engaged from the Home / Overview states b/133265591 b/132716177 Change-Id: I8c7b9d45be65216f2f1a69f69ab1636accd812c0 --- .../android/launcher3/allapps/AllAppsContainerView.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 41252aab54..63682c73ac 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -41,6 +41,7 @@ import com.android.launcher3.Insettable; import com.android.launcher3.InsettableFrameLayout; import com.android.launcher3.ItemInfo; import com.android.launcher3.Launcher; +import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.TestProtocol; import com.android.launcher3.Utilities; @@ -193,11 +194,18 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo @Override public boolean onInterceptTouchEvent(MotionEvent ev) { + + // The AllAppsContainerView houses the QSB and is hence visible from the Workspace + // Overview states. We shouldn't intercept for the scrubber in these cases. + if (!mLauncher.isInState(LauncherState.ALL_APPS)) return false; + if (ev.getAction() == MotionEvent.ACTION_DOWN) { AllAppsRecyclerView rv = getActiveRecyclerView(); if (rv != null && rv.getScrollbar().isHitInParent(ev.getX(), ev.getY(), mFastScrollerOffset)) { mTouchHandler = rv.getScrollbar(); + } else { + mTouchHandler = null; } } if (mTouchHandler != null) {