From 86bf6ae902b4b7c7c01484e6e204ff2ed6895d1d Mon Sep 17 00:00:00 2001 From: Artsiom Mitrokhin Date: Mon, 25 Nov 2024 10:38:48 -0500 Subject: [PATCH] Prevent spawning multiple pinning popups on right click The dismiss logic only checks for `ACTION_DOWN` events, but when the user frequently right-clicks OR right-press-move-release, we get multiple `ACTION_MOVE` events instead, which are ignored by the dismiss logic of the previous popup instance. Attached screen recordings to the bug. Bug: 362475367 Flag: EXEMPT bugfix Test: manual Change-Id: I665c3127e4b449a8f4c71e443cc6ae07c1bf2794 --- .../src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java | 1 + 1 file changed, 1 insertion(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java index f65f30799d..604d32da0a 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java @@ -91,6 +91,7 @@ public class TaskbarViewCallbacks { public View.OnTouchListener getTaskbarDividerRightClickListener() { return (v, event) -> { if (event.isFromSource(InputDevice.SOURCE_MOUSE) + && event.getAction() == MotionEvent.ACTION_DOWN && event.getButtonState() == MotionEvent.BUTTON_SECONDARY) { mControllers.taskbarPinningController.showPinningView(v, getDividerCenterX()); return true;