am 68b81434: Merge "Fix bug 4533120 - rough handling of invalid event streams in ScaleGestureDetector" into honeycomb-mr2
* commit '68b81434963db90e0d5b14710e4edd86084ede3c': Fix bug 4533120 - rough handling of invalid event streams in ScaleGestureDetector
This commit is contained in:
@@ -329,6 +329,15 @@ public class ScaleGestureDetector {
|
|||||||
// Set focus point to the remaining finger
|
// Set focus point to the remaining finger
|
||||||
final int index = event.findPointerIndex(actionId == mActiveId0 ?
|
final int index = event.findPointerIndex(actionId == mActiveId0 ?
|
||||||
mActiveId1 : mActiveId0);
|
mActiveId1 : mActiveId0);
|
||||||
|
if (index < 0) {
|
||||||
|
mInvalidGesture = true;
|
||||||
|
Log.e(TAG, "Invalid MotionEvent stream detected.", new Throwable());
|
||||||
|
if (mGestureInProgress) {
|
||||||
|
mListener.onScaleEnd(this);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
mActiveId0 = event.getPointerId(index);
|
mActiveId0 = event.getPointerId(index);
|
||||||
|
|
||||||
mActive0MostRecent = true;
|
mActive0MostRecent = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user