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

Commit ff0e4d6f authored by Daniel Norman's avatar Daniel Norman
Browse files

cleanup: clean up flag event_dispatcher_raw_event

Bug: 385812366
Flag: EXEMPT removing event_dispatcher_raw_event
Test: presubmit
Change-Id: I608840f79bb416768a860fddf3705fe8ce1e0723
parent 108ab7fc
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -162,16 +162,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
@@ -310,8 +310,7 @@ public class EventDispatcher {
                sendMotionEvent(
                        prototype,
                        action,
                        Flags.eventDispatcherRawEvent() ? mState.getLastReceivedRawEvent() :
                                mState.getLastReceivedEvent(),
                        mState.getLastReceivedRawEvent(),
                        pointerIdBits,
                        policyFlags);
            }
@@ -341,8 +340,7 @@ public class EventDispatcher {
                sendMotionEvent(
                        event,
                        action,
                        Flags.eventDispatcherRawEvent() ? mState.getLastReceivedRawEvent() :
                                mState.getLastReceivedEvent(),
                        mState.getLastReceivedRawEvent(),
                        pointerIdBits,
                        policyFlags);
            }
@@ -409,9 +407,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
@@ -469,7 +469,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();