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

Commit 3bacd78c authored by Gavin Williams's avatar Gavin Williams Committed by Android (Google) Code Review
Browse files

Merge "Autoclick: Fix mouse disconnect logic" into main

parents c6b775cd de0afc20
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -416,6 +416,8 @@ public class AutoclickController extends BaseEventStreamTransformation implement
                    new InputManagerWrapper(mContext.getSystemService(InputManager.class));
        }
        mInputManagerWrapper.registerInputDeviceListener(mInputDeviceListener, handler);
        // Trigger listener to register currently connected input device.
        mInputDeviceListener.onInputDeviceChanged(/* deviceId= */ 0);
    }

    @Override
+0 −8
Original line number Diff line number Diff line
@@ -1660,10 +1660,6 @@ public class AutoclickControllerTest {
                .registerInputDeviceListener(listenerCaptor.capture(), any());
        InputManager.InputDeviceListener listener = listenerCaptor.getValue();

        // Manually trigger once to establish initial connected state.
        listener.onInputDeviceChanged(1);
        mTestableLooper.processAllMessages();

        // Mock panels to verify interactions.
        AutoclickTypePanel mockTypePanel = mock(AutoclickTypePanel.class);
        AutoclickScrollPanel mockScrollPanel = mock(AutoclickScrollPanel.class);
@@ -1773,10 +1769,6 @@ public class AutoclickControllerTest {
                .registerInputDeviceListener(listenerCaptor.capture(), any());
        InputManager.InputDeviceListener listener = listenerCaptor.getValue();

        // Manually trigger once to establish initial connected state.
        listener.onInputDeviceChanged(1);
        mTestableLooper.processAllMessages();

        // Mock panels to verify interactions.
        AutoclickTypePanel mockTypePanel = mock(AutoclickTypePanel.class);
        AutoclickScrollPanel mockScrollPanel = mock(AutoclickScrollPanel.class);