Taskbar running apps: show one icon per task + tap opens that task

Before this CL we would show only one Taskbar icon per app, making it
impossible (through the taskbar) to switch between several windows of
the same app.
With this CL we add one icon per task instead, making it possible to
bring each task to the front individually.

Flag: com.android.window.flags.enable_desktop_windowing_taskbar_running_apps
Bug: 351118893
Bug: 349790805
Bug: 351156858
Test: Started several Chrome windows -> taskbar has one icon per window

Change-Id: Ia692977effceb9ce339906bf6ca24d73e19d8769
This commit is contained in:
Gustav Sennton committed 2024-07-09 14:48:04 +00:00
1 parent a00c81c173
commit f3108c59ed
6 files changed
+383 -183

No files matched your search

@@ -196,26 +196,26 @@ public class TaskbarModelCallbacks implements
final TaskbarRecentAppsController recentAppsController =
mControllers.taskbarRecentAppsController;
hotseatItemInfos = recentAppsController.updateHotseatItemInfos(hotseatItemInfos);
Set<String> runningPackages = recentAppsController.getRunningAppPackages();
Set<String> minimizedPackages = recentAppsController.getMinimizedAppPackages();
Set<Integer> runningTaskIds = recentAppsController.getRunningTaskIds();
Set<Integer> minimizedTaskIds = recentAppsController.getMinimizedTaskIds();
if (mDeferUpdatesForSUW) {
ItemInfo[] finalHotseatItemInfos = hotseatItemInfos;
mDeferredUpdates = () ->
commitHotseatItemUpdates(finalHotseatItemInfos,
recentAppsController.getShownTasks(), runningPackages,
minimizedPackages);
recentAppsController.getShownTasks(), runningTaskIds,
minimizedTaskIds);
} else {
commitHotseatItemUpdates(hotseatItemInfos,
recentAppsController.getShownTasks(), runningPackages, minimizedPackages);
recentAppsController.getShownTasks(), runningTaskIds, minimizedTaskIds);
}
}
private void commitHotseatItemUpdates(ItemInfo[] hotseatItemInfos, List<GroupTask> recentTasks,
Set<String> runningPackages, Set<String> minimizedPackages) {
Set<Integer> runningTaskIds, Set<Integer> minimizedTaskIds) {
mContainer.updateHotseatItems(hotseatItemInfos, recentTasks);
mControllers.taskbarViewController.updateIconViewsRunningStates(
runningPackages, minimizedPackages);
runningTaskIds, minimizedTaskIds);
}
/**