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

Commit c458f323 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android Git Automerger
Browse files

am 9bfb8bcf: Merge "Up motion event not injected by the touch explorer at the...

am 9bfb8bcf: Merge "Up motion event not injected by the touch explorer at the end of a drag." into jb-mr1-dev

* commit '9bfb8bcf':
  Up motion event not injected by the touch explorer at the end of a drag.
parents 2e4f54de 9bfb8bcf
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ class TouchExplorer implements EventStreamTransformation {
    private GestureLibrary mGestureLibrary;

    // The long pressing pointer id if coordinate remapping is needed.
    private int mLongPressingPointerId;
    private int mLongPressingPointerId = -1;

    // The long pressing pointer X if coordinate remapping is needed.
    private int mLongPressingPointerDeltaX;
@@ -702,10 +702,24 @@ class TouchExplorer implements EventStreamTransformation {
                    }
                }
            } break;
            case MotionEvent.ACTION_POINTER_UP: {
                 final int pointerId = event.getPointerId(event.getActionIndex());
                 if (pointerId == mDraggingPointerId) {
                     mDraggingPointerId = INVALID_POINTER_ID;
                     // Send an event to the end of the drag gesture.
                     sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
                 }
            } break;
            case MotionEvent.ACTION_UP: {
                // Announce the end of a new touch interaction.
                sendAccessibilityEvent(
                        AccessibilityEvent.TYPE_TOUCH_INTERACTION_END);
                final int pointerId = event.getPointerId(event.getActionIndex());
                if (pointerId == mDraggingPointerId) {
                    mDraggingPointerId = INVALID_POINTER_ID;
                    // Send an event to the end of the drag gesture.
                    sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
                }
                mCurrentState = STATE_TOUCH_EXPLORING;
            } break;
            case MotionEvent.ACTION_CANCEL: {