Loading services/accessibility/java/com/android/server/accessibility/AccessibilityGestureDetector.java +9 −10 Original line number Diff line number Diff line Loading @@ -62,14 +62,6 @@ class AccessibilityGestureDetector extends GestureDetector.SimpleOnGestureListen */ void onDoubleTapAndHold(MotionEvent event, int policyFlags); /** * Called when the user touches the screen on the second tap of a double * tap. * * @return true if the event is consumed, else false */ boolean onDoubleTapStarted(); /** * Called when the user lifts their finger on the second tap of a double * tap. Loading Loading @@ -246,13 +238,20 @@ class AccessibilityGestureDetector extends GestureDetector.SimpleOnGestureListen mBaseY = y; mBaseTime = time; // Since the pointer has moved, this is not a double // tap. mFirstTapDetected = false; mDoubleTapDetected = false; // If this hasn't been confirmed as a gesture yet, send // the event. if (!mGestureStarted) { mGestureStarted = true; return mListener.onGestureStarted(); } } else { } else if (!mFirstTapDetected) { // The finger may not move if they are double tapping. // In that case, we shouldn't cancel the gesture. final long timeDelta = time - mBaseTime; final long threshold = mGestureStarted ? CANCEL_ON_PAUSE_THRESHOLD_STARTED_MS : Loading Loading @@ -371,7 +370,7 @@ class AccessibilityGestureDetector extends GestureDetector.SimpleOnGestureListen // The processing of the double tap is deferred until the finger is // lifted, so that we can detect a long press on the second tap. mDoubleTapDetected = true; return mListener.onDoubleTapStarted(); return false; } private void maybeSendLongPress(MotionEvent event, int policyFlags) { Loading services/accessibility/java/com/android/server/accessibility/TouchExplorer.java +0 −5 Original line number Diff line number Diff line Loading @@ -389,11 +389,6 @@ class TouchExplorer implements EventStreamTransformation, AccessibilityGestureDe sendDownForAllNotInjectedPointers(event, policyFlags); } @Override public boolean onDoubleTapStarted() { return true; } @Override public boolean onDoubleTap(MotionEvent event, int policyFlags) { // Ignore the event if we aren't touch exploring. Loading Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityGestureDetector.java +9 −10 Original line number Diff line number Diff line Loading @@ -62,14 +62,6 @@ class AccessibilityGestureDetector extends GestureDetector.SimpleOnGestureListen */ void onDoubleTapAndHold(MotionEvent event, int policyFlags); /** * Called when the user touches the screen on the second tap of a double * tap. * * @return true if the event is consumed, else false */ boolean onDoubleTapStarted(); /** * Called when the user lifts their finger on the second tap of a double * tap. Loading Loading @@ -246,13 +238,20 @@ class AccessibilityGestureDetector extends GestureDetector.SimpleOnGestureListen mBaseY = y; mBaseTime = time; // Since the pointer has moved, this is not a double // tap. mFirstTapDetected = false; mDoubleTapDetected = false; // If this hasn't been confirmed as a gesture yet, send // the event. if (!mGestureStarted) { mGestureStarted = true; return mListener.onGestureStarted(); } } else { } else if (!mFirstTapDetected) { // The finger may not move if they are double tapping. // In that case, we shouldn't cancel the gesture. final long timeDelta = time - mBaseTime; final long threshold = mGestureStarted ? CANCEL_ON_PAUSE_THRESHOLD_STARTED_MS : Loading Loading @@ -371,7 +370,7 @@ class AccessibilityGestureDetector extends GestureDetector.SimpleOnGestureListen // The processing of the double tap is deferred until the finger is // lifted, so that we can detect a long press on the second tap. mDoubleTapDetected = true; return mListener.onDoubleTapStarted(); return false; } private void maybeSendLongPress(MotionEvent event, int policyFlags) { Loading
services/accessibility/java/com/android/server/accessibility/TouchExplorer.java +0 −5 Original line number Diff line number Diff line Loading @@ -389,11 +389,6 @@ class TouchExplorer implements EventStreamTransformation, AccessibilityGestureDe sendDownForAllNotInjectedPointers(event, policyFlags); } @Override public boolean onDoubleTapStarted() { return true; } @Override public boolean onDoubleTap(MotionEvent event, int policyFlags) { // Ignore the event if we aren't touch exploring. Loading