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

Commit 3442833f authored by Daniel Norman's avatar Daniel Norman Committed by Android (Google) Code Review
Browse files

Merge "cleanup: clean up flag event_dispatcher_raw_event" into main

parents 4e97c1a9 ff0e4d6f
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -152,16 +152,6 @@ flag {
    bug: "409330539"
}

flag {
    name: "event_dispatcher_raw_event"
    namespace: "accessibility"
    description: "Fixes EventDispatcher#sendMotionEvent callers to properly provide raw event"
    bug: "385812366"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "fix_drag_pointer_when_ending_drag"
    namespace: "accessibility"
+3 −7
Original line number Diff line number Diff line
@@ -320,8 +320,7 @@ public class EventDispatcher {
                sendMotionEvent(
                        prototype,
                        action,
                        Flags.eventDispatcherRawEvent() ? mState.getLastReceivedRawEvent() :
                                mState.getLastReceivedEvent(),
                        mState.getLastReceivedRawEvent(),
                        pointerIdBits,
                        policyFlags);
            }
@@ -351,8 +350,7 @@ public class EventDispatcher {
                sendMotionEvent(
                        event,
                        action,
                        Flags.eventDispatcherRawEvent() ? mState.getLastReceivedRawEvent() :
                                mState.getLastReceivedEvent(),
                        mState.getLastReceivedRawEvent(),
                        pointerIdBits,
                        policyFlags);
            }
@@ -419,9 +417,7 @@ public class EventDispatcher {
                continue;
            }
            final int action = computeInjectionAction(MotionEvent.ACTION_POINTER_UP, i);
            sendMotionEvent(prototype, action,
                    Flags.eventDispatcherRawEvent() ? mState.getLastReceivedRawEvent() :
                            mState.getLastReceivedEvent(),
            sendMotionEvent(prototype, action, mState.getLastReceivedRawEvent(),
                    pointerIdBits, policyFlags);
            pointerIdBits &= ~(1 << pointerId);
        }
+4 −7
Original line number Diff line number Diff line
@@ -504,14 +504,13 @@ public class TouchExplorer extends BaseEventStreamTransformation

                // We have just decided that the user is touch,
                // exploring so start sending events.
                mSendHoverEnterAndMoveDelayed.addEvent(event,
                        Flags.eventDispatcherRawEvent() ? rawEvent : mState.getLastReceivedEvent());
                mSendHoverEnterAndMoveDelayed.addEvent(event, rawEvent);
                mSendHoverEnterAndMoveDelayed.forceSendAndRemove();
                mSendHoverExitDelayed.cancel();
                mDispatcher.sendMotionEvent(
                        event,
                        ACTION_HOVER_MOVE,
                        Flags.eventDispatcherRawEvent() ? rawEvent : event,
                        rawEvent,
                        pointerIdBits,
                        policyFlags);
                return true;
@@ -1129,8 +1128,7 @@ public class TouchExplorer extends BaseEventStreamTransformation
            mDispatcher.sendMotionEvent(
                    event,
                    ACTION_HOVER_EXIT,
                    Flags.eventDispatcherRawEvent() ? mState.getLastReceivedRawEvent() :
                            mState.getLastReceivedEvent(),
                    mState.getLastReceivedRawEvent(),
                    pointerIdBits,
                    policyFlags);
        }
@@ -1152,8 +1150,7 @@ public class TouchExplorer extends BaseEventStreamTransformation
            mDispatcher.sendMotionEvent(
                    event,
                    ACTION_HOVER_ENTER,
                    Flags.eventDispatcherRawEvent() ? mState.getLastReceivedRawEvent() :
                            mState.getLastReceivedEvent(),
                    mState.getLastReceivedRawEvent(),
                    pointerIdBits,
                    policyFlags);
        }
+0 −1
Original line number Diff line number Diff line
@@ -468,7 +468,6 @@ public class TouchExplorerTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_EVENT_DISPATCHER_RAW_EVENT)
    public void testSendHoverExitIfNeeded_lastSentHoverEnter_sendsHoverExit_withCorrectRawEvent() {
        final MotionEvent rawEvent = downEvent();
        final MotionEvent modifiedEvent = hoverEnterEvent();