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

Commit 36a9946b authored by Jun Mukai's avatar Jun Mukai
Browse files

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

Change-Id: I8e13a179dc076cc44248662e6e8fd60e8cc69a3f
parent 2858bd2e
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;