@@ -457,6 +457,9 @@ private void handleMotionEventStateDragging(MotionEvent event, int policyFlags)
457457 case MotionEvent .ACTION_MOVE : {
458458 final int activePointerCount = mPointerTracker .getActivePointerCount ();
459459 switch (activePointerCount ) {
460+ case 1 : {
461+ // do nothing
462+ } break ;
460463 case 2 : {
461464 if (isDraggingGesture (event )) {
462465 // If still dragging send a drag event.
@@ -484,10 +487,12 @@ private void handleMotionEventStateDragging(MotionEvent event, int policyFlags)
484487 }
485488 } break ;
486489 case MotionEvent .ACTION_POINTER_UP : {
487- mCurrentState = STATE_TOUCH_EXPLORING ;
488490 // Send an event to the end of the drag gesture.
489491 sendMotionEvent (event , MotionEvent .ACTION_UP , pointerIdBits , policyFlags );
490492 } break ;
493+ case MotionEvent .ACTION_UP : {
494+ mCurrentState = STATE_TOUCH_EXPLORING ;
495+ } break ;
491496 case MotionEvent .ACTION_CANCEL : {
492497 clear ();
493498 } break ;
@@ -500,7 +505,7 @@ private void handleMotionEventStateDragging(MotionEvent event, int policyFlags)
500505 * @param event The event to be handled.
501506 * @param policyFlags The policy flags associated with the event.
502507 */
503- public void handleMotionEventStateDelegating (MotionEvent event , int policyFlags ) {
508+ private void handleMotionEventStateDelegating (MotionEvent event , int policyFlags ) {
504509 switch (event .getActionMasked ()) {
505510 case MotionEvent .ACTION_DOWN : {
506511 throw new IllegalStateException ("Delegating state can only be reached if "
0 commit comments