Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopFullImmersiveTransitionHandler.kt +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ class DesktopFullImmersiveTransitionHandler( /** Whether there is an immersive transition that hasn't completed yet. */ private val inProgress: Boolean get() = state != null get() = state != null || pendingExternalExitTransitions.isNotEmpty() private val rectEvaluator = RectEvaluator() Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopMixedTransitionHandler.kt +2 −2 Original line number Diff line number Diff line Loading @@ -58,9 +58,9 @@ class DesktopMixedTransitionHandler( freeformTaskTransitionHandler.startMinimizedModeTransition(wct) /** Starts close transition and handles or delegates desktop task close animation. */ override fun startRemoveTransition(wct: WindowContainerTransaction?) { override fun startRemoveTransition(wct: WindowContainerTransaction?): IBinder { requireNotNull(wct) transitions.startTransition(WindowManager.TRANSIT_CLOSE, wct, /* handler= */ this) return transitions.startTransition(WindowManager.TRANSIT_CLOSE, wct, /* handler= */ this) } /** Returns null, as it only handles transitions started from Shell. */ Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +7 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,12 @@ class DesktopTasksController( * @param displayId display id of the window that's being closed * @param taskId task id of the window that's being closed */ fun onDesktopWindowClose(wct: WindowContainerTransaction, displayId: Int, taskId: Int) { fun onDesktopWindowClose( wct: WindowContainerTransaction, displayId: Int, taskInfo: RunningTaskInfo, ): ((IBinder) -> Unit)? { val taskId = taskInfo.taskId if (taskRepository.isOnlyVisibleNonClosingTask(taskId)) { removeWallpaperActivity(wct) } Loading @@ -472,6 +477,7 @@ class DesktopTasksController( taskId ) ) return immersiveTransitionHandler.exitImmersiveIfApplicable(wct, taskInfo) } fun minimizeTask(taskInfo: RunningTaskInfo) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionHandler.java +5 −4 Original line number Diff line number Diff line Loading @@ -99,9 +99,11 @@ public class FreeformTaskTransitionHandler @Override public void startRemoveTransition(WindowContainerTransaction wct) { public IBinder startRemoveTransition(WindowContainerTransaction wct) { final int type = WindowManager.TRANSIT_CLOSE; mPendingTransitionTokens.add(mTransitions.startTransition(type, wct, this)); final IBinder transition = mTransitions.startTransition(type, wct, this); mPendingTransitionTokens.add(transition); return transition; } @Override Loading Loading @@ -229,8 +231,7 @@ public class FreeformTaskTransitionHandler SurfaceControl.Transaction t = new SurfaceControl.Transaction(); SurfaceControl sc = change.getLeash(); finishT.hide(sc); Rect startBounds = new Rect(change.getTaskInfo().configuration.windowConfiguration .getBounds()); final Rect startBounds = new Rect(change.getStartAbsBounds()); animator.addUpdateListener(animation -> { t.setPosition(sc, startBounds.left, startBounds.top + (animation.getAnimatedFraction() * screenHeight)); Loading libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionStarter.java +2 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public interface FreeformTaskTransitionStarter { * * @param wct the {@link WindowContainerTransaction} that closes the task * * @return the started transition */ void startRemoveTransition(WindowContainerTransaction wct); IBinder startRemoveTransition(WindowContainerTransaction wct); } No newline at end of file Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopFullImmersiveTransitionHandler.kt +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ class DesktopFullImmersiveTransitionHandler( /** Whether there is an immersive transition that hasn't completed yet. */ private val inProgress: Boolean get() = state != null get() = state != null || pendingExternalExitTransitions.isNotEmpty() private val rectEvaluator = RectEvaluator() Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopMixedTransitionHandler.kt +2 −2 Original line number Diff line number Diff line Loading @@ -58,9 +58,9 @@ class DesktopMixedTransitionHandler( freeformTaskTransitionHandler.startMinimizedModeTransition(wct) /** Starts close transition and handles or delegates desktop task close animation. */ override fun startRemoveTransition(wct: WindowContainerTransaction?) { override fun startRemoveTransition(wct: WindowContainerTransaction?): IBinder { requireNotNull(wct) transitions.startTransition(WindowManager.TRANSIT_CLOSE, wct, /* handler= */ this) return transitions.startTransition(WindowManager.TRANSIT_CLOSE, wct, /* handler= */ this) } /** Returns null, as it only handles transitions started from Shell. */ Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +7 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,12 @@ class DesktopTasksController( * @param displayId display id of the window that's being closed * @param taskId task id of the window that's being closed */ fun onDesktopWindowClose(wct: WindowContainerTransaction, displayId: Int, taskId: Int) { fun onDesktopWindowClose( wct: WindowContainerTransaction, displayId: Int, taskInfo: RunningTaskInfo, ): ((IBinder) -> Unit)? { val taskId = taskInfo.taskId if (taskRepository.isOnlyVisibleNonClosingTask(taskId)) { removeWallpaperActivity(wct) } Loading @@ -472,6 +477,7 @@ class DesktopTasksController( taskId ) ) return immersiveTransitionHandler.exitImmersiveIfApplicable(wct, taskInfo) } fun minimizeTask(taskInfo: RunningTaskInfo) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionHandler.java +5 −4 Original line number Diff line number Diff line Loading @@ -99,9 +99,11 @@ public class FreeformTaskTransitionHandler @Override public void startRemoveTransition(WindowContainerTransaction wct) { public IBinder startRemoveTransition(WindowContainerTransaction wct) { final int type = WindowManager.TRANSIT_CLOSE; mPendingTransitionTokens.add(mTransitions.startTransition(type, wct, this)); final IBinder transition = mTransitions.startTransition(type, wct, this); mPendingTransitionTokens.add(transition); return transition; } @Override Loading Loading @@ -229,8 +231,7 @@ public class FreeformTaskTransitionHandler SurfaceControl.Transaction t = new SurfaceControl.Transaction(); SurfaceControl sc = change.getLeash(); finishT.hide(sc); Rect startBounds = new Rect(change.getTaskInfo().configuration.windowConfiguration .getBounds()); final Rect startBounds = new Rect(change.getStartAbsBounds()); animator.addUpdateListener(animation -> { t.setPosition(sc, startBounds.left, startBounds.top + (animation.getAnimatedFraction() * screenHeight)); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionStarter.java +2 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public interface FreeformTaskTransitionStarter { * * @param wct the {@link WindowContainerTransaction} that closes the task * * @return the started transition */ void startRemoveTransition(WindowContainerTransaction wct); IBinder startRemoveTransition(WindowContainerTransaction wct); } No newline at end of file