[DO NOT MERGE] Clear properties after interaction is ended am: 1145db5d8e am: 63a3ab4e33

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12085174

Change-Id: Ie7526e85dcf04104d5748e4b7bcb9c714cbab03d
This commit is contained in:
ryanlwlin
2020-07-08 07:42:11 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 0 deletions

View File

@@ -322,6 +322,12 @@ class EventDispatcher {
return true;
}
void clear() {
mLongPressingPointerId = -1;
mLongPressingPointerDeltaX = 0;
mLongPressingPointerDeltaY = 0;
}
public void clickWithTouchEvents(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
final int pointerIndex = event.getActionIndex();
final int pointerId = event.getPointerId(pointerIndex);

View File

@@ -809,6 +809,7 @@ public class TouchExplorer extends BaseEventStreamTransformation
// Announce the end of a the touch interaction.
mAms.onTouchInteractionEnd();
mDispatcher.clear();
mDispatcher.sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_END);
} break;