am bcbc2ec2: Merge "Removing call to isButtonPressed as its only Lollipop and above" into ub-launcher3-burnaby

* commit 'bcbc2ec2cd2673b5fca40f8458f75a7712410dda':
  Removing call to isButtonPressed as its only Lollipop and above
This commit is contained in:
Sunny Goyal
2015-08-24 17:20:59 +00:00
committed by Android Git Automerger

View File

@@ -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);
}
}