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

Commit b24183a3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix getting InputMethod from motionEvent on the click listener to get...

Merge "Fix getting InputMethod from motionEvent on the click listener to get the actual input method." into main
parents 4a2f9625 4d544e02
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1575,8 +1575,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,

        final DesktopModeTouchEventListener touchEventListener =
                new DesktopModeTouchEventListener(taskInfo, taskPositioner);
        InputMethod inputMethod = DesktopModeEventLogger.getInputMethodFromMotionEvent(
                touchEventListener.mMotionEvent);
        windowDecoration.setOnMaximizeOrRestoreClickListener(() -> {
            onMaximizeOrRestore(taskInfo.taskId, "maximize_menu", ResizeTrigger.MAXIMIZE_MENU,
                    touchEventListener.mMotionEvent);
@@ -1587,11 +1585,15 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
            return Unit.INSTANCE;
        });
        windowDecoration.setOnLeftSnapClickListener(() -> {
            onSnapResize(taskInfo.taskId, /* isLeft= */ true, inputMethod);
            onSnapResize(taskInfo.taskId, /* isLeft= */ true,
                    DesktopModeEventLogger.getInputMethodFromMotionEvent(
                            touchEventListener.mMotionEvent));
            return Unit.INSTANCE;
        });
        windowDecoration.setOnRightSnapClickListener(() -> {
            onSnapResize(taskInfo.taskId, /* isLeft= */ false, inputMethod);
            onSnapResize(taskInfo.taskId, /* isLeft= */ false,
                    DesktopModeEventLogger.getInputMethodFromMotionEvent(
                            touchEventListener.mMotionEvent));
            return Unit.INSTANCE;
        });
        windowDecoration.setOnToDesktopClickListener(desktopModeTransitionSource -> {