From 2d2c0e68987b478c860e3876c5457d4c5b3954d5 Mon Sep 17 00:00:00 2001 From: Jorge Gil Date: Wed, 5 Jul 2023 16:31:03 +0000 Subject: [PATCH] Use shell transitions to finalize cancel-to-desktop When a to-desktop transition is cancelled, a WCT changing the task's windowing mode to fullscreen was applied using #applyTransaction, which meant that our transition observer doesn't get notified of the change that allows it to swap the window decoration from the desktop to the fullscreen version. onTaskInfoChanged usually covers cases that transitions don't, but in this case TaskListeners may just get a vanish callback for the freeform trask and an appear callback for the fullscreen task. To avoid mixing these two channels this CL changes the WCT to be applied using shell transitions. It's also likely that it'll need to be animated in the future to prevent a jump cut from one config to the next. Bug: 290050157 Test: drag from fullscreen to desktop without releasing, drag back to top to cancel the transition. Verify the caption version is correct. Change-Id: I87ffaab5fc1b88a58b3d075a341a1e2a204a34cb --- .../com/android/wm/shell/desktopmode/DesktopTasksController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4fda4b7896c23..40ea2764d2951 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 @@ -286,7 +286,7 @@ class DesktopTasksController( visualIndicator?.releaseVisualIndicator(t) visualIndicator = null addMoveToFullscreenChanges(callbackWCT, task) - shellTaskOrganizer.applyTransaction(callbackWCT) + transitions.startTransition(TRANSIT_CHANGE, callbackWCT, null /* handler */) } } else { addMoveToFullscreenChanges(wct, task)