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

Commit 3d3d3593 authored by Asmita Poddar's avatar Asmita Poddar Committed by Android (Google) Code Review
Browse files

Merge "Replace InputManager.getInstance() with getSystemService() from context"

parents 680d5388 47585203
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
                InputDevice.SOURCE_KEYBOARD);

        ev.setDisplayId(mContext.getDisplay().getDisplayId());
        if (!InputManager.getInstance()
        if (!mContext.getSystemService(InputManager.class)
                .injectInputEvent(ev, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC)) {
            Log.e(TAG, "Inject input event fail");
        }
+2 −2
Original line number Diff line number Diff line
@@ -64,8 +64,8 @@ class BubblesNavBarGestureTracker {

        stopInternal();

        mInputMonitor = InputManager.getInstance().monitorGestureInput(GESTURE_MONITOR,
                mContext.getDisplayId());
        mInputMonitor = mContext.getSystemService(InputManager.class)
                .monitorGestureInput(GESTURE_MONITOR, mContext.getDisplayId());
        InputChannel inputChannel = mInputMonitor.getInputChannel();

        BubblesNavBarMotionEventHandler motionEventHandler =
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ public class PipResizeGestureHandler {

        if (mIsEnabled) {
            // Register input event receiver
            mInputMonitor = InputManager.getInstance().monitorGestureInput(
            mInputMonitor = mContext.getSystemService(InputManager.class).monitorGestureInput(
                    "pip-resize", mDisplayId);
            try {
                mMainExecutor.executeBlocking(() -> {
+1 −1
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
    }

    private void createInputChannel(int displayId) {
        final InputManager inputManager = InputManager.getInstance();
        final InputManager inputManager = mContext.getSystemService(InputManager.class);
        final InputMonitor inputMonitor =
                mInputMonitorFactory.create(inputManager, mContext);
        final EventReceiver eventReceiver = new EventReceiver(inputMonitor,
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ class TaskOperations {
                InputDevice.SOURCE_KEYBOARD);

        ev.setDisplayId(mContext.getDisplay().getDisplayId());
        if (!InputManager.getInstance()
        if (!mContext.getSystemService(InputManager.class)
                .injectInputEvent(ev, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC)) {
            Log.e(TAG, "Inject input event fail");
        }
Loading