Merge "DO NOT MERGE GestureDetector - Mask action when checking POINTER_UP" into jb-dev

This commit is contained in:
Adam Powell
2012-08-31 11:24:30 -07:00
committed by Android (Google) Code Review

View File

@ -453,7 +453,8 @@ public class GestureDetector {
} }
mVelocityTracker.addMovement(ev); mVelocityTracker.addMovement(ev);
final boolean pointerUp = action == MotionEvent.ACTION_POINTER_UP; final boolean pointerUp =
(action & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_POINTER_UP;
final int skipIndex = pointerUp ? ev.getActionIndex() : -1; final int skipIndex = pointerUp ? ev.getActionIndex() : -1;
// Determine focal point // Determine focal point