summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ben Lin <linben@google.com> 2021-04-15 15:49:28 -0700
committer Ben Lin <linben@google.com> 2021-04-15 15:49:28 -0700
commitaeb4ac64f44c6cda2d18d0a254bcf84d27e08ace (patch)
tree45b3bb4daa7aad0ecf2849cd0ff136a0c8047d9a
parent1430546720742776de5dfcedf5267986aa07c1f6 (diff)
PiP: Don't invoke double-tap gesture (maximize) if menu is showing.
If the menu is showing and populated with icons, the user intention is more likely to interact with the menu. Prioritize on that and drop gestures such as double-tap. Bug: 185458696 Bug: 184789345 Test: Double-tap while menu is showing Change-Id: Icac92ec8cafdcb2f3a11919a4c6a227bf85d446c
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java
index f29d4f59493e..a669d980aead 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java
@@ -871,7 +871,8 @@ public class PipTouchHandler {
mMotionHelper.flingToSnapTarget(vel.x, vel.y,
this::flingEndAction /* endAction */);
}
- } else if (mTouchState.isDoubleTap() && !mPipBoundsState.isStashed()) {
+ } else if (mTouchState.isDoubleTap() && !mPipBoundsState.isStashed()
+ && mMenuState != MENU_STATE_FULL) {
// If using pinch to zoom, double-tap functions as resizing between max/min size
if (mPipResizeGestureHandler.isUsingPinchToZoom()) {
final boolean toExpand = mPipBoundsState.getBounds().width()