From 04a8ec4fc6fa1b801daa222cb1b956f3f9dcbe9d Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Thu, 27 Oct 2016 17:01:32 -0700 Subject: [PATCH] Consume touch events in DeepShortcutsContainer Previously, touches along the horizontal area next to the deep shortcuts arrow went through to the background, allowing things like going to overview with the shortcuts still open. Bug: 32477287 Change-Id: I82d21d3051a13b23dfaac19e93facee120968aaa --- .../launcher3/shortcuts/DeepShortcutsContainer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java index 4daa09e019..2f9c6d6807 100644 --- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java +++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java @@ -20,6 +20,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.TimeInterpolator; +import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.content.ComponentName; import android.content.Context; @@ -412,6 +413,15 @@ public class DeepShortcutsContainer extends AbstractFloatingView }; } + /** + * We need to handle touch events to prevent them from falling through to the workspace below. + */ + @SuppressLint("ClickableViewAccessibility") + @Override + public boolean onTouchEvent(MotionEvent ev) { + return true; + } + @Override public boolean onTouch(View v, MotionEvent ev) { // Touched a shortcut, update where it was touched so we can drag from there on long click.