mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
[Desktop Mode] Show indicators under Taskbar app icons for running apps
In Desktop Mode we show running Desktop apps in the Taskbar. With this change we also show an indicator under the app icon for each such running app. Bug: 332504528 Test: manual Test: DesktopTaskbarRunningAppsControllerTest Flag: ACONFIG com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps DEVELOPMENT Change-Id: If0906dab8ad0bd8a78d93a4e99db47550e763bed
This commit is contained in:
@@ -47,6 +47,7 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -233,15 +234,23 @@ public class TaskbarModelCallbacks implements
|
||||
}
|
||||
hotseatItemInfos = mControllers.taskbarRecentAppsController
|
||||
.updateHotseatItemInfos(hotseatItemInfos);
|
||||
Set<String> runningPackages = mControllers.taskbarRecentAppsController.getRunningApps();
|
||||
|
||||
if (mDeferUpdatesForSUW) {
|
||||
ItemInfo[] finalHotseatItemInfos = hotseatItemInfos;
|
||||
mDeferredUpdates = () -> mContainer.updateHotseatItems(finalHotseatItemInfos);
|
||||
mDeferredUpdates = () ->
|
||||
commitHotseatItemUpdates(finalHotseatItemInfos, runningPackages);
|
||||
} else {
|
||||
mContainer.updateHotseatItems(hotseatItemInfos);
|
||||
commitHotseatItemUpdates(hotseatItemInfos, runningPackages);
|
||||
}
|
||||
}
|
||||
|
||||
private void commitHotseatItemUpdates(
|
||||
ItemInfo[] hotseatItemInfos, Set<String> runningPackages) {
|
||||
mContainer.updateHotseatItems(hotseatItemInfos);
|
||||
mControllers.taskbarViewController.updateIconViewsRunningStates(runningPackages);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is used to defer UI updates after SUW builds the unstash animation.
|
||||
* @param defer if true, defers updates to the UI
|
||||
|
||||
Reference in New Issue
Block a user