Do a full touch dispach when proxying touch
> Workspace can no longer be scrolled when swipin on hotseat
Bug: 130027168
Change-Id: Ie4621e5b7de8d7248227b25fb065249d0c252090
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) {