am 601d5817: Merge "TouchExplorer crashes if there is incative pointer while dragging." into ics-mr0

* commit '601d5817301bc79c34c30e7b606fe872b2b76c31':
  TouchExplorer crashes if there is incative pointer while dragging.
This commit is contained in:
Svetoslav Ganov
2011-10-18 11:54:03 -07:00
committed by Android Git Automerger

View File

@ -487,8 +487,16 @@ public class TouchExplorer implements Explorer {
}
} break;
case MotionEvent.ACTION_POINTER_UP: {
// Send an event to the end of the drag gesture.
sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
final int activePointerCount = mPointerTracker.getActivePointerCount();
switch (activePointerCount) {
case 1: {
// Send an event to the end of the drag gesture.
sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
} break;
default: {
mCurrentState = STATE_TOUCH_EXPLORING;
}
}
} break;
case MotionEvent.ACTION_UP: {
mCurrentState = STATE_TOUCH_EXPLORING;