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
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java
index f65f307..604d32d 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewCallbacks.java
@@ -91,6 +91,7 @@
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;