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

Commit 1e6cb467 authored by Saho Kobayashi's avatar Saho Kobayashi
Browse files

Remove unnecessary reorder on resize start

WindowManagerService#onPointerDownOutsideFocusLocked handles the focus.
ResizeTaskPositioners don't need to call reorder.

Test: manual(resize and observe caption color)
Bug: b:419353852
Flag: com.android.window.flags.enable_display_focus_in_shell_transitions

Change-Id: I3a87a42be3607ee8a180addf96ec18e558078e9a
parent 44fba6c5
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -97,12 +97,6 @@ class FluidResizeTaskPositioner implements TaskPositioner, Transitions.Transitio
        mTaskBoundsAtDragStart.set(
                mWindowDecoration.getTaskInfo().configuration.windowConfiguration.getBounds());
        mRepositionStartPoint.set(x, y);
        if (mCtrlType != CTRL_TYPE_UNDEFINED && !mWindowDecoration.getHasGlobalFocus()) {
            WindowContainerTransaction wct = new WindowContainerTransaction();
            wct.reorder(mWindowDecoration.getTaskInfo().token, true /* onTop */,
                    true /* includingParents */);
            mTaskOrganizer.applyTransaction(wct);
        }
        mRepositionTaskBounds.set(mTaskBoundsAtDragStart);
        int rotation = mWindowDecoration
                .getTaskInfo().configuration.windowConfiguration.getDisplayRotation();
+0 −9
Original line number Diff line number Diff line
@@ -114,15 +114,6 @@ class MultiDisplayVeiledResizeTaskPositioner(
            interactionJankMonitor.begin(
                createLongTimeoutJankConfigBuilder(Cuj.CUJ_DESKTOP_MODE_RESIZE_WINDOW)
            )
            if (!windowDecoration.hasGlobalFocus) {
                val wct = WindowContainerTransaction()
                wct.reorder(
                    windowDecoration.taskInfo.token,
                    /* onTop= */ true,
                    /* includingParents= */ true,
                )
                taskOrganizer.applyTransaction(wct)
            }
        }
        repositionTaskBounds.set(taskBoundsAtDragStart)
        val rotation =
+0 −6
Original line number Diff line number Diff line
@@ -120,12 +120,6 @@ public class VeiledResizeTaskPositioner implements TaskPositioner, Transitions.T
            // Capture CUJ for re-sizing window in DW mode.
            mInteractionJankMonitor.begin(
                    createLongTimeoutJankConfigBuilder(CUJ_DESKTOP_MODE_RESIZE_WINDOW));
            if (!mWindowDecoration.getHasGlobalFocus()) {
                WindowContainerTransaction wct = new WindowContainerTransaction();
                wct.reorder(mWindowDecoration.getTaskInfo().token, true /* onTop */,
                        true /* includingParents */);
                mTaskOrganizer.applyTransaction(wct);
            }
        }
        mRepositionTaskBounds.set(mTaskBoundsAtDragStart);
        int rotation = mWindowDecoration
+1 −1
Original line number Diff line number Diff line
@@ -671,7 +671,7 @@ class FluidResizeTaskPositionerTest : ShellTestCase() {
        )

        // Verify task is reordered to top
        verify(mockShellTaskOrganizer).applyTransaction(argThat { wct ->
        verify(mockShellTaskOrganizer, never()).applyTransaction(argThat { wct ->
            return@argThat wct.hierarchyOps.any { hierarchyOps ->
                hierarchyOps.container == taskBinder && hierarchyOps.toTop }
        })
+1 −1
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ class MultiDisplayVeiledResizeTaskPositionerTest : ShellTestCase() {
        )

        // Verify task is reordered to top
        verify(mockShellTaskOrganizer)
        verify(mockShellTaskOrganizer, never())
            .applyTransaction(
                argThat { wct ->
                    return@argThat wct.hierarchyOps.any { hierarchyOps ->
Loading