diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java index 1aa31446d5..572615ff8a 100644 --- a/src/com/android/launcher3/AbstractFloatingView.java +++ b/src/com/android/launcher3/AbstractFloatingView.java @@ -257,4 +257,8 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch @FloatingViewType int type) { return getOpenView(activity, type); } + + public boolean canInterceptEventsInSystemGestureRegion() { + return false; + } } diff --git a/src/com/android/launcher3/views/BaseDragLayer.java b/src/com/android/launcher3/views/BaseDragLayer.java index c37c47c0a0..f54edc223f 100644 --- a/src/com/android/launcher3/views/BaseDragLayer.java +++ b/src/com/android/launcher3/views/BaseDragLayer.java @@ -186,11 +186,12 @@ public abstract class BaseDragLayer + ", isEventInLauncher=" + isEventInLauncher(ev) + ", topOpenView=" + AbstractFloatingView.getTopOpenView(mActivity)); } - if (isEventInLauncher(ev)) { - AbstractFloatingView topView = AbstractFloatingView.getTopOpenView(mActivity); - if (topView != null && topView.onControllerInterceptTouchEvent(ev)) { - return topView; - } + + AbstractFloatingView topView = AbstractFloatingView.getTopOpenView(mActivity); + if (topView != null + && (isEventInLauncher(ev) || topView.canInterceptEventsInSystemGestureRegion()) + && topView.onControllerInterceptTouchEvent(ev)) { + return topView; } for (TouchController controller : mControllers) { diff --git a/src/com/android/launcher3/views/ListenerView.java b/src/com/android/launcher3/views/ListenerView.java index 575f86454c..3ef778b575 100644 --- a/src/com/android/launcher3/views/ListenerView.java +++ b/src/com/android/launcher3/views/ListenerView.java @@ -106,4 +106,9 @@ public class ListenerView extends AbstractFloatingView { // We want other views to be able to intercept the touch so we return false here. return false; } + + @Override + public boolean canInterceptEventsInSystemGestureRegion() { + return true; + } }