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

Commit 4c759ca9 authored by Jun Mukai's avatar Jun Mukai Committed by Android (Google) Code Review
Browse files

Merge "Fix: ToolType() check -> isFromSource()."

parents 2359d85e 36a9946b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5455,7 +5455,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @hide
     */
    protected boolean performButtonActionOnTouchDown(MotionEvent event) {
        if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE &&
        if (event.isFromSource(InputDevice.SOURCE_MOUSE) &&
            (event.getButtonState() & MotionEvent.BUTTON_SECONDARY) != 0) {
            showContextMenu(event.getX(), event.getY());
            mPrivateFlags |= PFLAG_CANCEL_NEXT_UP_EVENT;