diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewInputConsumer.java
index 7794d8d..b803071 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewInputConsumer.java
@@ -136,17 +136,13 @@
     }
 
     private void sendEvent(MotionEvent ev) {
-        if (mInvalidated || !mTarget.verifyTouchDispatch(this, ev)) {
-            mInvalidated = true;
+        if (mInvalidated) {
             return;
         }
         int flags = ev.getEdgeFlags();
         ev.setEdgeFlags(flags | Utilities.EDGE_NAV_BAR);
         ev.offsetLocation(-mLocationOnScreen[0], -mLocationOnScreen[1]);
-        if (ev.getAction() == ACTION_DOWN) {
-            mTarget.onInterceptTouchEvent(ev);
-        }
-        mTarget.onTouchEvent(ev);
+        mInvalidated = !mTarget.dispatchTouchEvent(this, ev);
         ev.offsetLocation(mLocationOnScreen[0], mLocationOnScreen[1]);
         ev.setEdgeFlags(flags);
     }
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index cbd3fc0..4da7907 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -20,6 +20,7 @@
 import android.graphics.Rect;
 import android.util.AttributeSet;
 import android.view.Gravity;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewDebug;
 import android.view.ViewGroup;
@@ -98,4 +99,10 @@
         setLayoutParams(lp);
         InsettableFrameLayout.dispatchInsets(this, insets);
     }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        // Don't let if follow through to workspace
+        return true;
+    }
 }
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index f8d9959..c14512a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -974,7 +974,6 @@
         mDropTargetBar.setup(mDragController);
 
         mAllAppsController.setupViews(mAppsView);
-        mHotseat.setOnInterceptTouchListener(mWorkspace::onInterceptHotseatTouch);
     }
 
     /**
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index d24a5a6..2ee537c 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -475,13 +475,6 @@
         super.onViewAdded(child);
     }
 
-    protected boolean onInterceptHotseatTouch(View v, MotionEvent ev) {
-        // We don't want any clicks to go through to the hotseat unless the workspace is in
-        // the normal state or an accessible drag is in progress.
-        return !workspaceIconsCanBeDragged()
-                && !mLauncher.getAccessibilityDelegate().isInAccessibleDrag();
-    }
-
     /**
      * Initializes and binds the first page
      * @param qsb an existing qsb to recycle or null.
diff --git a/src/com/android/launcher3/views/BaseDragLayer.java b/src/com/android/launcher3/views/BaseDragLayer.java
index bd6bfd6..ab72bbe 100644
--- a/src/com/android/launcher3/views/BaseDragLayer.java
+++ b/src/com/android/launcher3/views/BaseDragLayer.java
@@ -223,14 +223,18 @@
 
     @Override
     public boolean dispatchTouchEvent(MotionEvent ev) {
-        return verifyTouchDispatch(this, ev) && super.dispatchTouchEvent(ev);
+        return dispatchTouchEvent(this, ev);
+    }
+
+    public boolean dispatchTouchEvent(Object caller, MotionEvent ev) {
+        return verifyTouchDispatch(caller, ev) && super.dispatchTouchEvent(ev);
     }
 
     /**
      * Returns true if the {@param caller} is allowed to dispatch {@param ev} on this view,
      * false otherwise.
      */
-    public boolean verifyTouchDispatch(Object caller, MotionEvent ev) {
+    private boolean verifyTouchDispatch(Object caller, MotionEvent ev) {
         int action = ev.getAction();
         if (action == ACTION_DOWN) {
             if (mCurrentTouchOwner != null) {
