diff options
| author | 2025-02-26 17:28:22 +0000 | |
|---|---|---|
| committer | 2025-02-26 21:56:27 +0000 | |
| commit | 2bde8a522afb10f5e3ba41572ebeac4ada00730d (patch) | |
| tree | f7d8ee2c966ab50ab36e828d6695bde662db06de | |
| parent | b5c139eef0853c5e1d824b30a89ebe7a0d6901a4 (diff) | |
[29/N] Desks: Add #addMoveTaskToDeskChanges
This is a pure refactor. It merges addMoveToDesktopChanges() and
prepareMoveTaskToDesk() into a single method to avoid flag-checking at
different call sites and to prevent misuse of either one.
Flag: com.android.window.flags.enable_multiple_desktops_backend
Bug: 362720497
Test: atest WMShellUnitTests
Change-Id: I21c3c7c815cacb29e25188fdb9ec9c06382105e3
2 files changed, 77 insertions, 100 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt index 0e2328154474..fd0fa33c4233 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt @@ -673,11 +673,7 @@ class DesktopTasksController( // Bring other apps to front first. bringDesktopAppsToFrontBeforeShowingNewTask(displayId, wct, task.taskId) } - if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) { - prepareMoveTaskToDesk(wct, task, deskId) - } else { - addMoveToDesktopChanges(wct, task) - } + addMoveToDeskTaskChanges(wct = wct, task = task, deskId = deskId) return taskIdToMinimize } @@ -1309,11 +1305,7 @@ class DesktopTasksController( // TODO: b/393977830 and b/397437641 - do not assume that freeform==desktop. if (!task.isFreeform) { - if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) { - prepareMoveTaskToDesk(wct, task, destinationDeskId) - } else { - addMoveToDesktopChanges(wct, task, displayId) - } + addMoveToDeskTaskChanges(wct = wct, task = task, deskId = destinationDeskId) } else { if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) { desksOrganizer.moveTaskToDesk(wct, destinationDeskId, task) @@ -2419,11 +2411,7 @@ class DesktopTasksController( logD("Switch fullscreen task to freeform on transition: taskId=%d", task.taskId) return WindowContainerTransaction().also { wct -> val deskId = getDefaultDeskId(task.displayId) - if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) { - prepareMoveTaskToDesk(wct, task, deskId) - } else { - addMoveToDesktopChanges(wct, task) - } + addMoveToDeskTaskChanges(wct = wct, task = task, deskId = deskId) // In some launches home task is moved behind new task being launched. Make sure // that's not the case for launches in desktop. Also, if this launch is the first // one to trigger the desktop mode (e.g., when [forceEnterDesktop()]), activate the @@ -2550,55 +2538,44 @@ class DesktopTasksController( } /** - * Apply all changes required when task is first added to desktop. Uses the task's current - * display by default to apply initial bounds and placement relative to the display. Use a - * different [displayId] if the task should be moved to a different display. + * Applies the [wct] changes needed when a task is first moving to a desk. + * + * Note that this recalculates the initial bounds of the task, so it should not be used when + * transferring a task between desks. + * + * TODO: b/362720497 - this should be improved to be reusable by desk-to-desk CUJs where + * [DesksOrganizer.moveTaskToDesk] needs to be called and even cross-display CUJs where + * [applyFreeformDisplayChange] needs to be called. Potentially by comparing source vs + * destination desk ids and display ids, or adding extra arguments to the function. */ - @VisibleForTesting - @Deprecated("Deprecated with multiple desks", ReplaceWith("prepareMoveTaskToDesk()")) - fun addMoveToDesktopChanges( + fun addMoveToDeskTaskChanges( wct: WindowContainerTransaction, - taskInfo: RunningTaskInfo, - displayId: Int = taskInfo.displayId, - ) { - val displayLayout = displayController.getDisplayLayout(displayId) ?: return - val tdaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId)!! - val tdaWindowingMode = tdaInfo.configuration.windowConfiguration.windowingMode - // TODO: b/397437641 - reconsider the windowing mode choice when multiple desks is enabled. - val targetWindowingMode = - if (tdaWindowingMode == WINDOWING_MODE_FREEFORM) { - // Display windowing is freeform, set to undefined and inherit it - WINDOWING_MODE_UNDEFINED - } else { - WINDOWING_MODE_FREEFORM - } - val initialBounds = getInitialBounds(displayLayout, taskInfo, displayId) - - if (canChangeTaskPosition(taskInfo)) { - wct.setBounds(taskInfo.token, initialBounds) - } - wct.setWindowingMode(taskInfo.token, targetWindowingMode) - wct.reorder(taskInfo.token, /* onTop= */ true) - if (useDesktopOverrideDensity()) { - wct.setDensityDpi(taskInfo.token, DESKTOP_DENSITY_OVERRIDE) - } - } - - private fun prepareMoveTaskToDesk( - wct: WindowContainerTransaction, - taskInfo: RunningTaskInfo, + task: RunningTaskInfo, deskId: Int, ) { - if (!DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) return - val displayId = taskRepository.getDisplayForDesk(deskId) - val displayLayout = displayController.getDisplayLayout(displayId) ?: return - val initialBounds = getInitialBounds(displayLayout, taskInfo, displayId) - if (canChangeTaskPosition(taskInfo)) { - wct.setBounds(taskInfo.token, initialBounds) + val targetDisplayId = taskRepository.getDisplayForDesk(deskId) + val displayLayout = displayController.getDisplayLayout(targetDisplayId) ?: return + val initialBounds = getInitialBounds(displayLayout, task, targetDisplayId) + if (canChangeTaskPosition(task)) { + wct.setBounds(task.token, initialBounds) + } + if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue) { + desksOrganizer.moveTaskToDesk(wct = wct, deskId = deskId, task = task) + } else { + val tdaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(targetDisplayId)!! + val tdaWindowingMode = tdaInfo.configuration.windowConfiguration.windowingMode + val targetWindowingMode = + if (tdaWindowingMode == WINDOWING_MODE_FREEFORM) { + // Display windowing is freeform, set to undefined and inherit it + WINDOWING_MODE_UNDEFINED + } else { + WINDOWING_MODE_FREEFORM + } + wct.setWindowingMode(task.token, targetWindowingMode) + wct.reorder(task.token, /* onTop= */ true) } - desksOrganizer.moveTaskToDesk(wct, deskId = deskId, task = taskInfo) if (useDesktopOverrideDensity()) { - wct.setDensityDpi(taskInfo.token, DESKTOP_DENSITY_OVERRIDE) + wct.setDensityDpi(task.token, DESKTOP_DENSITY_OVERRIDE) } } diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt index 20123d1f8235..f866f2d9c3ba 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt @@ -1109,44 +1109,44 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() } @Test - fun addMoveToDesktopChanges_gravityLeft_noBoundsApplied() { + fun addMoveToDeskTaskChanges_gravityLeft_noBoundsApplied() { setUpLandscapeDisplay() val task = setUpFullscreenTask(gravity = Gravity.LEFT) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(finalBounds).isEqualTo(Rect()) } @Test - fun addMoveToDesktopChanges_gravityRight_noBoundsApplied() { + fun addMoveToDeskTaskChanges_gravityRight_noBoundsApplied() { setUpLandscapeDisplay() val task = setUpFullscreenTask(gravity = Gravity.RIGHT) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(finalBounds).isEqualTo(Rect()) } @Test - fun addMoveToDesktopChanges_gravityTop_noBoundsApplied() { + fun addMoveToDeskTaskChanges_gravityTop_noBoundsApplied() { setUpLandscapeDisplay() val task = setUpFullscreenTask(gravity = Gravity.TOP) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(finalBounds).isEqualTo(Rect()) } @Test - fun addMoveToDesktopChanges_gravityBottom_noBoundsApplied() { + fun addMoveToDeskTaskChanges_gravityBottom_noBoundsApplied() { setUpLandscapeDisplay() val task = setUpFullscreenTask(gravity = Gravity.BOTTOM) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(finalBounds).isEqualTo(Rect()) @@ -1187,7 +1187,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_positionBottomRight() { + fun addMoveToDeskTaskChanges_positionBottomRight() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1196,7 +1196,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1205,7 +1205,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_positionTopLeft() { + fun addMoveToDeskTaskChanges_positionTopLeft() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1214,7 +1214,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1223,7 +1223,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_positionBottomLeft() { + fun addMoveToDeskTaskChanges_positionBottomLeft() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1232,7 +1232,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1241,7 +1241,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_positionTopRight() { + fun addMoveToDeskTaskChanges_positionTopRight() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1250,7 +1250,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1259,7 +1259,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_positionResetsToCenter() { + fun addMoveToDeskTaskChanges_positionResetsToCenter() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1268,7 +1268,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1277,7 +1277,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_lastWindowSnapLeft_positionResetsToCenter() { + fun addMoveToDeskTaskChanges_lastWindowSnapLeft_positionResetsToCenter() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1289,7 +1289,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1298,7 +1298,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_lastWindowSnapRight_positionResetsToCenter() { + fun addMoveToDeskTaskChanges_lastWindowSnapRight_positionResetsToCenter() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1316,7 +1316,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1325,7 +1325,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_lastWindowMaximised_positionResetsToCenter() { + fun addMoveToDeskTaskChanges_lastWindowMaximised_positionResetsToCenter() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1335,7 +1335,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1344,7 +1344,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_CASCADING_WINDOWS) - fun addMoveToDesktopChanges_defaultToCenterIfFree() { + fun addMoveToDeskTaskChanges_defaultToCenterIfFree() { setUpLandscapeDisplay() val stableBounds = Rect() displayLayout.getStableBoundsForDesktopMode(stableBounds) @@ -1362,7 +1362,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() val task = setUpFullscreenTask() val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) assertThat(stableBounds.getDesktopTaskPosition(finalBounds!!)) @@ -1370,7 +1370,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() } @Test - fun addMoveToDesktopChanges_excludeCaptionFromAppBounds_nonResizableLandscape() { + fun addMoveToDeskTaskChanges_excludeCaptionFromAppBounds_nonResizableLandscape() { setUpLandscapeDisplay() val task = setUpFullscreenTask( @@ -1380,7 +1380,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() whenever(desktopModeCompatPolicy.shouldExcludeCaptionFromAppBounds(task)).thenReturn(true) val initialAspectRatio = calculateAspectRatio(task) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) val captionInsets = getAppHeaderHeight(context) @@ -1392,7 +1392,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() } @Test - fun addMoveToDesktopChanges_excludeCaptionFromAppBounds_nonResizablePortrait() { + fun addMoveToDeskTaskChanges_excludeCaptionFromAppBounds_nonResizablePortrait() { setUpLandscapeDisplay() val task = setUpFullscreenTask( @@ -1402,7 +1402,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() whenever(desktopModeCompatPolicy.shouldExcludeCaptionFromAppBounds(task)).thenReturn(true) val initialAspectRatio = calculateAspectRatio(task) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) val finalBounds = findBoundsChange(wct, task) val captionInsets = getAppHeaderHeight(context) @@ -1440,29 +1440,29 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() @Test @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS) - fun addMoveToDesktopChanges_landscapeDevice_userFullscreenOverride_defaultPortraitBounds() { + fun addMoveToDeskTaskChanges_landscapeDevice_userFullscreenOverride_defaultPortraitBounds() { setUpLandscapeDisplay() val task = setUpFullscreenTask(enableUserFullscreenOverride = true) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS) } @Test @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS) - fun addMoveToDesktopChanges_landscapeDevice_systemFullscreenOverride_defaultPortraitBounds() { + fun addMoveToDeskTaskChanges_landscapeDevice_systemFullscreenOverride_defaultPortraitBounds() { setUpLandscapeDisplay() val task = setUpFullscreenTask(enableSystemFullscreenOverride = true) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS) } @Test @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS) - fun addMoveToDesktopChanges_landscapeDevice_portraitResizableApp_aspectRatioOverridden() { + fun addMoveToDeskTaskChanges_landscapeDevice_portraitResizableApp_aspectRatioOverridden() { setUpLandscapeDisplay() val task = setUpFullscreenTask( @@ -1471,36 +1471,36 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() aspectRatioOverrideApplied = true, ) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) assertThat(findBoundsChange(wct, task)).isEqualTo(UNRESIZABLE_PORTRAIT_BOUNDS) } @Test @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS) - fun addMoveToDesktopChanges_portraitDevice_userFullscreenOverride_defaultPortraitBounds() { + fun addMoveToDeskTaskChanges_portraitDevice_userFullscreenOverride_defaultPortraitBounds() { setUpPortraitDisplay() val task = setUpFullscreenTask(enableUserFullscreenOverride = true) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS) } @Test @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS) - fun addMoveToDesktopChanges_portraitDevice_systemFullscreenOverride_defaultPortraitBounds() { + fun addMoveToDeskTaskChanges_portraitDevice_systemFullscreenOverride_defaultPortraitBounds() { setUpPortraitDisplay() val task = setUpFullscreenTask(enableSystemFullscreenOverride = true) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS) } @Test @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS) - fun addMoveToDesktopChanges_portraitDevice_landscapeResizableApp_aspectRatioOverridden() { + fun addMoveToDeskTaskChanges_portraitDevice_landscapeResizableApp_aspectRatioOverridden() { setUpPortraitDisplay() val task = setUpFullscreenTask( @@ -1510,7 +1510,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase() aspectRatioOverrideApplied = true, ) val wct = WindowContainerTransaction() - controller.addMoveToDesktopChanges(wct, task) + controller.addMoveToDeskTaskChanges(wct, task, deskId = 0) assertThat(findBoundsChange(wct, task)).isEqualTo(UNRESIZABLE_LANDSCAPE_BOUNDS) } |