Support Desktop unminimize animations, and move app-state logic
- Support Desktop unminimize animations through
1. keyboard alt-tab shortcut
2. taskbar hotseat icon click (TaskItemInfo)
3. taskbar running-app icon click (GroupTask)
- move taskbar running-app state logic from TaskbarViewController to
TaskbarRecentAppsController.
Test: manual - ensure the transitions above cause unminimize animations
Bug: 369966334
Flag: com.android.window.flags.enable_desktop_app_launch_alttab_transitions
Change-Id: I20322bdf58bc69cff360bf26e533e0732d5297b9
This commit is contained in:
1 parent
22a60f4940
commit
461caa7c5f
6 files changed
+81
-41
No files matched your search
@@ -42,7 +42,6 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
@@ -196,26 +195,21 @@ public class TaskbarModelCallbacks implements
|
||||
final TaskbarRecentAppsController recentAppsController =
|
||||
mControllers.taskbarRecentAppsController;
|
||||
hotseatItemInfos = recentAppsController.updateHotseatItemInfos(hotseatItemInfos);
|
||||
Set<Integer> runningTaskIds = recentAppsController.getRunningTaskIds();
|
||||
Set<Integer> minimizedTaskIds = recentAppsController.getMinimizedTaskIds();
|
||||
|
||||
if (mDeferUpdatesForSUW) {
|
||||
ItemInfo[] finalHotseatItemInfos = hotseatItemInfos;
|
||||
mDeferredUpdates = () ->
|
||||
commitHotseatItemUpdates(finalHotseatItemInfos,
|
||||
recentAppsController.getShownTasks(), runningTaskIds,
|
||||
minimizedTaskIds);
|
||||
recentAppsController.getShownTasks());
|
||||
} else {
|
||||
commitHotseatItemUpdates(hotseatItemInfos,
|
||||
recentAppsController.getShownTasks(), runningTaskIds, minimizedTaskIds);
|
||||
commitHotseatItemUpdates(hotseatItemInfos, recentAppsController.getShownTasks());
|
||||
}
|
||||
}
|
||||
|
||||
private void commitHotseatItemUpdates(ItemInfo[] hotseatItemInfos, List<GroupTask> recentTasks,
|
||||
Set<Integer> runningTaskIds, Set<Integer> minimizedTaskIds) {
|
||||
private void commitHotseatItemUpdates(
|
||||
ItemInfo[] hotseatItemInfos, List<GroupTask> recentTasks) {
|
||||
mContainer.updateHotseatItems(hotseatItemInfos, recentTasks);
|
||||
mControllers.taskbarViewController.updateIconViewsRunningStates(
|
||||
runningTaskIds, minimizedTaskIds);
|
||||
mControllers.taskbarViewController.updateIconViewsRunningStates();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user