[DO NOT MERGE] Clear properties after interaction is ended
The properties populated when double-tap and hold is detected is not cleared after interaction end. It cuases an offset on hoverevent. Bug: 160463594 Test: atest TouchExplorerTest Change-Id: Id5115fe64e4bda9c7657f67bef62290858442de9
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user