From f1e994276e767098b97227e88863da76748f074c Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Wed, 8 Feb 2023 15:23:18 -0800 Subject: [PATCH] Bring home task to front when desktop tasks are moved to front Bring over change from proto 2. When bringing desktop tasks to front, also make sure home task is moved behind them. Bug: 267364407 Test: atest DesktopModeControllerTest Change-Id: I85e7dacd30986eb35dbf88030da85bfa844d5023 --- .../desktopmode/DesktopModeController.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeController.java index a839a230ea6ff..d85041642c3a0 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeController.java @@ -253,7 +253,8 @@ public class DesktopModeController implements RemoteCallable activeTasks = mDesktopModeTaskRepository.getActiveTasks(); ProtoLog.d(WM_SHELL_DESKTOP_MODE, "bringDesktopAppsToFront: tasks=%s", activeTasks.size()); @@ -282,18 +281,11 @@ public class DesktopModeController implements RemoteCallable mDesktopModeTaskRepository.isVisibleTask(info.taskId)); - if (allActiveTasksAreVisible) { - ProtoLog.d(WM_SHELL_DESKTOP_MODE, - "bringDesktopAppsToFront: active tasks are already in front, skipping."); - return wct; - } - } + moveHomeTaskToFront(wct); + ProtoLog.d(WM_SHELL_DESKTOP_MODE, "bringDesktopAppsToFront: reordering all active tasks to the front"); final List allTasksInZOrder = @@ -304,7 +296,15 @@ public class DesktopModeController implements RemoteCallable