Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -409,7 +409,7 @@ class DesktopTasksController( interactionJankMonitor.begin(taskSurface, context, handler, CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD) dragToDesktopTransitionHandler.startDragToDesktopTransition( taskInfo, taskInfo.taskId, dragToDesktopValueAnimator ) } Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt +6 −9 Original line number Diff line number Diff line Loading @@ -109,8 +109,8 @@ sealed class DragToDesktopTransitionHandler( * after one of the "end" or "cancel" transitions is merged into this transition. */ fun startDragToDesktopTransition( taskInfo: RunningTaskInfo, dragToDesktopAnimator: MoveToDesktopAnimator taskId: Int, dragToDesktopAnimator: MoveToDesktopAnimator, ) { if (inProgress) { ProtoLog.v( Loading @@ -137,26 +137,23 @@ sealed class DragToDesktopTransitionHandler( ) val wct = WindowContainerTransaction() wct.sendPendingIntent(pendingIntent, launchHomeIntent, Bundle()) // The home launch done above will result in an attempt to move the task to pip if // applicable, resulting in a broken state. Prevent that here. wct.setDoNotPip(taskInfo.token) val startTransitionToken = transitions.startTransition(TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP, wct, this) transitionState = if (isSplitTask(taskInfo.taskId)) { if (isSplitTask(taskId)) { val otherTask = getOtherSplitTask(taskInfo.taskId) getOtherSplitTask(taskId) ?: throw IllegalStateException("Expected split task to have a counterpart.") TransitionState.FromSplit( draggedTaskId = taskInfo.taskId, draggedTaskId = taskId, dragAnimator = dragToDesktopAnimator, startTransitionToken = startTransitionToken, otherSplitTask = otherTask ) } else { TransitionState.FromFullscreen( draggedTaskId = taskInfo.taskId, draggedTaskId = taskId, dragAnimator = dragToDesktopAnimator, startTransitionToken = startTransitionToken ) Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -607,7 +607,7 @@ class DragToDesktopTransitionHandlerTest : ShellTestCase() { ) ) .thenReturn(token) handler.startDragToDesktopTransition(task, dragAnimator) handler.startDragToDesktopTransition(task.taskId, dragAnimator) return token } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -409,7 +409,7 @@ class DesktopTasksController( interactionJankMonitor.begin(taskSurface, context, handler, CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD) dragToDesktopTransitionHandler.startDragToDesktopTransition( taskInfo, taskInfo.taskId, dragToDesktopValueAnimator ) } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt +6 −9 Original line number Diff line number Diff line Loading @@ -109,8 +109,8 @@ sealed class DragToDesktopTransitionHandler( * after one of the "end" or "cancel" transitions is merged into this transition. */ fun startDragToDesktopTransition( taskInfo: RunningTaskInfo, dragToDesktopAnimator: MoveToDesktopAnimator taskId: Int, dragToDesktopAnimator: MoveToDesktopAnimator, ) { if (inProgress) { ProtoLog.v( Loading @@ -137,26 +137,23 @@ sealed class DragToDesktopTransitionHandler( ) val wct = WindowContainerTransaction() wct.sendPendingIntent(pendingIntent, launchHomeIntent, Bundle()) // The home launch done above will result in an attempt to move the task to pip if // applicable, resulting in a broken state. Prevent that here. wct.setDoNotPip(taskInfo.token) val startTransitionToken = transitions.startTransition(TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP, wct, this) transitionState = if (isSplitTask(taskInfo.taskId)) { if (isSplitTask(taskId)) { val otherTask = getOtherSplitTask(taskInfo.taskId) getOtherSplitTask(taskId) ?: throw IllegalStateException("Expected split task to have a counterpart.") TransitionState.FromSplit( draggedTaskId = taskInfo.taskId, draggedTaskId = taskId, dragAnimator = dragToDesktopAnimator, startTransitionToken = startTransitionToken, otherSplitTask = otherTask ) } else { TransitionState.FromFullscreen( draggedTaskId = taskInfo.taskId, draggedTaskId = taskId, dragAnimator = dragToDesktopAnimator, startTransitionToken = startTransitionToken ) Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -607,7 +607,7 @@ class DragToDesktopTransitionHandlerTest : ShellTestCase() { ) ) .thenReturn(token) handler.startDragToDesktopTransition(task, dragAnimator) handler.startDragToDesktopTransition(task.taskId, dragAnimator) return token } Loading