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

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

Merge "cleanup: clean up flag touch_explorer_use_virtual_device_id" into main

parents e7183f78 bd1a9863
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -303,13 +303,3 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "touch_explorer_use_virtual_device_id"
    namespace: "accessibility"
    description: "Use a VIRTUAL device id for injected TouchExplorer events to avoid temporary conflicts with real pointer touches still on the screen when TouchExplorer starts up."
    bug: "364408887"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}
+1 −3
Original line number Diff line number Diff line
@@ -140,9 +140,7 @@ public class EventDispatcher {
            event.getPointerProperties(i, p);
            properties[i] = p;
        }
        final int deviceId = Flags.touchExplorerUseVirtualDeviceId()
                ? VIRTUAL_TOUCHSCREEN_DEVICE_ID
                : rawEvent.getDeviceId();
        final int deviceId = VIRTUAL_TOUCHSCREEN_DEVICE_ID;
        event = MotionEvent.obtain(downTime, event.getEventTime(), event.getAction(),
                event.getPointerCount(), properties, coords,
                event.getMetaState(), event.getButtonState(),
+2 −13
Original line number Diff line number Diff line
@@ -232,7 +232,6 @@ class AccessibilityInputFilterInputTest {
     * These get converted into HOVER_ENTER -> HOVER_MOVE -> HOVER_EXIT events by the input filter.
     */
    @Test
    @EnableFlags(Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID)
    fun testSingleDeviceTouchEventsWithAllA11yFeatures() {
        enableFeatures(ALL_A11Y_FEATURES)

@@ -272,7 +271,6 @@ class AccessibilityInputFilterInputTest {
     * These get converted into HOVER_ENTER -> HOVER_EXIT -> HOVER_ENTER events by the input filter.
     */
    @Test
    @EnableFlags(Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID)
    fun testTouchDownCancelDownWithAllA11yFeatures() {
        enableFeatures(ALL_A11Y_FEATURES)

@@ -314,7 +312,6 @@ class AccessibilityInputFilterInputTest {
     * This test is the same as above, but for stylus events.
     */
    @Test
    @EnableFlags(Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID)
    fun testStylusDownCancelDownWithAllA11yFeatures() {
        enableFeatures(ALL_A11Y_FEATURES)

@@ -354,7 +351,6 @@ class AccessibilityInputFilterInputTest {
     * Enable all a11y features and send a stylus stream and then a touch stream.
     */
    @Test
    @EnableFlags(Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID)
    fun testStylusThenTouch() {
        enableFeatures(ALL_A11Y_FEATURES)

@@ -396,7 +392,6 @@ class AccessibilityInputFilterInputTest {
     * from the dispatcher.
     */
    @Test
    @EnableFlags(Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID)
    fun testSingleDeviceTouchEventsDisableFeaturesMidGesture() {
        enableFeatures(ALL_A11Y_FEATURES)

@@ -489,10 +484,7 @@ class AccessibilityInputFilterInputTest {
     * interleaved.
     */
    @Test
    @EnableFlags(
        Flags.FLAG_HANDLE_MULTI_DEVICE_INPUT,
        Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID
    )
    @EnableFlags(Flags.FLAG_HANDLE_MULTI_DEVICE_INPUT)
    fun testMultiDeviceEventsWithAllA11yFeatures() {
        enableFeatures(ALL_A11Y_FEATURES)

@@ -570,10 +562,7 @@ class AccessibilityInputFilterInputTest {
     * while stylus is active. Check that the latest device is always given preference.
     */
    @Test
    @EnableFlags(
        Flags.FLAG_HANDLE_MULTI_DEVICE_INPUT,
        Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID
    )
    @EnableFlags(Flags.FLAG_HANDLE_MULTI_DEVICE_INPUT)
    fun testStylusWithTouchInTheMiddle() {
        enableFeatures(ALL_A11Y_FEATURES)

+0 −1
Original line number Diff line number Diff line
@@ -181,7 +181,6 @@ public class TouchExplorerTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_TOUCH_EXPLORER_USE_VIRTUAL_DEVICE_ID)
    public void testOneFingerMove_injectedEventsUseVirtualDeviceId() {
        goFromStateClearTo(STATE_TOUCH_EXPLORING_1FINGER);
        // Wait for transiting to touch exploring state.