Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b354181a authored by Eghosa Ewansiha-Vlachavas's avatar Eghosa Ewansiha-Vlachavas Committed by Android (Google) Code Review
Browse files

Merge "Reset `mShouldClick` on ACTION_CANCEL event so click is not performed" into main

parents f3e29a89 1383da0c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -536,6 +536,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
            if (mGestureDetector.onTouchEvent(e)) {
                return true;
            }
            if (e.getActionMasked() == MotionEvent.ACTION_CANCEL) {
                // If a motion event is cancelled, reset mShouldClick so a click is not accidentally
                // performed.
                mShouldClick = false;
            }
            switch (e.getActionMasked()) {
                case MotionEvent.ACTION_DOWN: {
                    mDragPointerId = e.getPointerId(0);