diff --git a/src/com/android/launcher3/StylusEventHelper.java b/src/com/android/launcher3/StylusEventHelper.java index d0e3188a46..d5fc0fad47 100644 --- a/src/com/android/launcher3/StylusEventHelper.java +++ b/src/com/android/launcher3/StylusEventHelper.java @@ -101,8 +101,9 @@ public class StylusEventHelper { * @param event The event to check. * @return Whether a stylus button press occurred. */ - public static boolean isStylusButtonPressed(MotionEvent event) { + private static boolean isStylusButtonPressed(MotionEvent event) { return event.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS - && event.isButtonPressed(MotionEvent.BUTTON_SECONDARY); + && ((event.getButtonState() & MotionEvent.BUTTON_SECONDARY) + == MotionEvent.BUTTON_SECONDARY); } } \ No newline at end of file