Skip to content

Commit 5276373

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "Dragging in touch explore mode should not become exploring." into ics-mr0
2 parents c5b28bd + 2e1c66b commit 5276373

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

services/java/com/android/server/accessibility/TouchExplorer.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)