diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-08-24 17:15:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-24 17:15:01 +0000 |
commit | bcbc2ec2cd2673b5fca40f8458f75a7712410dda (patch) | |
tree | 31e94c2cfa807d32018d5ddada59539358015eae /src/com/android | |
parent | dd306188a6e8b4d00b8ef0ab402589c92802f04b (diff) | |
parent | 522142af51fed5d23492c00bc8a37ec0cca8fdcc (diff) | |
download | android_packages_apps_Trebuchet-bcbc2ec2cd2673b5fca40f8458f75a7712410dda.tar.gz android_packages_apps_Trebuchet-bcbc2ec2cd2673b5fca40f8458f75a7712410dda.tar.bz2 android_packages_apps_Trebuchet-bcbc2ec2cd2673b5fca40f8458f75a7712410dda.zip |
Merge "Removing call to isButtonPressed as its only Lollipop and above" into ub-launcher3-burnaby
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher3/StylusEventHelper.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/launcher3/StylusEventHelper.java b/src/com/android/launcher3/StylusEventHelper.java index da46e6a54..e03273a6e 100644 --- a/src/com/android/launcher3/StylusEventHelper.java +++ b/src/com/android/launcher3/StylusEventHelper.java @@ -1,8 +1,5 @@ package com.android.launcher3; -import com.android.launcher3.Utilities; - -import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; @@ -77,8 +74,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 |