diff options
Diffstat (limited to 'libs')
2 files changed, 3 insertions, 36 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeShellCommandHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeShellCommandHandler.kt index fd91ac0affc5..e1e41ee1e64d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeShellCommandHandler.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeShellCommandHandler.kt @@ -58,7 +58,7 @@ class DesktopModeShellCommandHandler(private val controller: DesktopTasksControl return false } - return controller.moveToDesktopWithoutDecor(taskId, WindowContainerTransaction()) + return controller.moveToDesktop(taskId, WindowContainerTransaction()) } override fun printShellCommandHelp(pw: PrintWriter, prefix: String) { 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 42c8d7417611..837cb99602c8 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 @@ -244,47 +244,14 @@ class DesktopTasksController( fun moveToDesktop( taskId: Int, wct: WindowContainerTransaction = WindowContainerTransaction() - ) { + ): Boolean { shellTaskOrganizer.getRunningTaskInfo(taskId)?.let { task -> moveToDesktop(task, wct) - } - } - - /** Move a task with given `taskId` to desktop without decor */ - fun moveToDesktopWithoutDecor( - taskId: Int, - wct: WindowContainerTransaction - ): Boolean { - val task = shellTaskOrganizer.getRunningTaskInfo(taskId) ?: return false - moveToDesktopWithoutDecor(task, wct) + } ?: return false return true } /** - * Move a task to desktop without decor - */ - private fun moveToDesktopWithoutDecor( - task: RunningTaskInfo, - wct: WindowContainerTransaction - ) { - KtProtoLog.v( - WM_SHELL_DESKTOP_MODE, - "DesktopTasksController: moveToDesktopWithoutDecor taskId=%d", - task.taskId - ) - exitSplitIfApplicable(wct, task) - // Bring other apps to front first - bringDesktopAppsToFront(task.displayId, wct) - addMoveToDesktopChanges(wct, task) - - if (Transitions.ENABLE_SHELL_TRANSITIONS) { - transitions.startTransition(TRANSIT_CHANGE, wct, null /* handler */) - } else { - shellTaskOrganizer.applyTransaction(wct) - } - } - - /** * Move a task to desktop */ fun moveToDesktop( |