Add running apps icons to taskbar for desktop environment.

This CL adds app icons for launched/running apps to the Launcher
taskbar hotseat. When the activity is closed, the app icon is
removed. The apps that are added to the taskbar on boot are never
removed.

Recall: http://recall/clips/ad6d3cfc-7358-4b37-846e-de843ad3000d

Bug: 183906774
Test: Launch an app and verify the app icon is added on the taskbar.
Close the app and verify the icon is removed from the taskbar.
Test: Switch navigation modes on the emulator and ensure that running
app icons are added to the taskbar after it is reinitialized.
Test: atest NexusLauncherTests:com.android.quickstep.RecentTasksListTest RecentTasksControllerTest

Change-Id: Ieaaf001530b5778871fb7a8d18cdcaa1ccbf0e31
This commit is contained in:
Merissa Tan committed 2022-03-10 15:30:06 -08:00
1 parent c480651522
commit 501ac7242d
10 files changed
+402 -6

No files matched your search

@@ -50,6 +50,7 @@ public class TaskbarControllers {
public final TaskbarPopupController taskbarPopupController;
public final TaskbarForceVisibleImmersiveController taskbarForceVisibleImmersiveController;
public final TaskbarAllAppsController taskbarAllAppsController;
public final TaskbarRecentAppsController taskbarRecentAppsController;
@Nullable private LoggableTaskbarController[] mControllersToLog = null;
@@ -75,7 +76,8 @@ public class TaskbarControllers {
TaskbarAutohideSuspendController taskbarAutoHideSuspendController,
TaskbarPopupController taskbarPopupController,
TaskbarForceVisibleImmersiveController taskbarForceVisibleImmersiveController,
TaskbarAllAppsController taskbarAllAppsController) {
TaskbarAllAppsController taskbarAllAppsController,
TaskbarRecentAppsController taskbarRecentAppsController) {
this.taskbarActivityContext = taskbarActivityContext;
this.taskbarDragController = taskbarDragController;
this.navButtonController = navButtonController;
@@ -93,6 +95,7 @@ public class TaskbarControllers {
this.taskbarPopupController = taskbarPopupController;
this.taskbarForceVisibleImmersiveController = taskbarForceVisibleImmersiveController;
this.taskbarAllAppsController = taskbarAllAppsController;
this.taskbarRecentAppsController = taskbarRecentAppsController;
}
/**
@@ -117,6 +120,7 @@ public class TaskbarControllers {
taskbarPopupController.init(this);
taskbarForceVisibleImmersiveController.init(this);
taskbarAllAppsController.init(this, sharedState);
taskbarRecentAppsController.init(this);
mControllersToLog = new LoggableTaskbarController[] {
taskbarDragController, navButtonController, navbarButtonsViewController,
@@ -153,6 +157,7 @@ public class TaskbarControllers {
taskbarPopupController.onDestroy();
taskbarForceVisibleImmersiveController.onDestroy();
taskbarAllAppsController.onDestroy();
taskbarRecentAppsController.onDestroy();
mControllersToLog = null;
}