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
This commit is contained in:
Tony Wickham committed 2016-10-27 17:01:32 -07:00
1 parent 5fd72d865e
commit 04a8ec4fc6
1 file changed
+10
@@ -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.