am 8de52276: am 3aa33b3d: Merge "Update button to BUTTON_STYLUS_PRIMARY" into mnc-dev

* commit '8de52276a1f5faf83ea8147f0ddee74195279bba':
  Update button to BUTTON_STYLUS_PRIMARY
This commit is contained in:
Mady Mellor
2015-06-01 18:50:15 +00:00
committed by Android Git Automerger
2 changed files with 3 additions and 4 deletions

View File

@@ -320,8 +320,8 @@ public class ScaleGestureDetector {
} }
final int count = event.getPointerCount(); final int count = event.getPointerCount();
final boolean isStylusButtonDown = (event.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS) final boolean isStylusButtonDown =
&& (event.getButtonState() & MotionEvent.BUTTON_SECONDARY) != 0; (event.getButtonState() & MotionEvent.BUTTON_STYLUS_PRIMARY) != 0;
final boolean anchoredScaleCancelled = final boolean anchoredScaleCancelled =
mAnchoredScaleMode == ANCHORED_SCALE_MODE_STYLUS && !isStylusButtonDown; mAnchoredScaleMode == ANCHORED_SCALE_MODE_STYLUS && !isStylusButtonDown;

View File

@@ -741,8 +741,7 @@ public class WindowManagerService extends IWindowManager.Stub
final float newX = motionEvent.getRawX(); final float newX = motionEvent.getRawX();
final float newY = motionEvent.getRawY(); final float newY = motionEvent.getRawY();
final boolean isStylusButtonDown = final boolean isStylusButtonDown =
(motionEvent.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS) (motionEvent.getButtonState() & MotionEvent.BUTTON_STYLUS_PRIMARY) != 0;
&& (motionEvent.getButtonState() & MotionEvent.BUTTON_SECONDARY) != 0;
if (mIsStartEvent) { if (mIsStartEvent) {
if (isStylusButtonDown) { if (isStylusButtonDown) {