Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81c238cb authored by Ameer Armaly's avatar Ameer Armaly
Browse files

Fix ghost pointer problem when transitioning from dragging to delegating.

We were not sending ACTION_DOWN to close out the dragging event stream before we passed control to talkback to let it determine what to do.

Flag: EXEMPT bugfix
Fix: 300002193
Test: Manual. Scroll with two fingers, then place a third finger on the screen. Inspect the event stream.
Change-Id: I8a6cd033874c7e73aa781e7eda59285d950d202f
parent 8ecc4567
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -974,6 +974,10 @@ public class TouchExplorer extends BaseEventStreamTransformation
                clear(event, policyFlags);
                return;
            case ACTION_POINTER_DOWN:
                if (mDraggingPointerId != INVALID_POINTER_ID) {
                    mDispatcher.sendMotionEvent(
                            event, ACTION_UP, rawEvent, pointerIdBits, policyFlags);
                }
                if (mState.isServiceDetectingGestures()) {
                    mAms.sendMotionEventToListeningServices(rawEvent);
                    return;
@@ -981,10 +985,6 @@ public class TouchExplorer extends BaseEventStreamTransformation
                // We are in dragging state so we have two pointers and another one
                // goes down => delegate the three pointers to the view hierarchy
                mState.startDelegating();
                if (mDraggingPointerId != INVALID_POINTER_ID) {
                    mDispatcher.sendMotionEvent(
                            event, ACTION_UP, rawEvent, pointerIdBits, policyFlags);
                }
                mDispatcher.sendDownForAllNotInjectedPointers(event, policyFlags);
                break;
            case ACTION_MOVE: