[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:
Gustav Sennton
2024-04-12 14:19:12 +00:00
parent 4e741082dc
commit 52a8b7e24b
11 changed files with 124 additions and 4 deletions

View File

@@ -71,6 +71,7 @@ import com.android.launcher3.util.MultiValueAlpha;
import com.android.launcher3.views.IconButtonView;
import java.io.PrintWriter;
import java.util.Set;
import java.util.function.Predicate;
/**
@@ -507,6 +508,15 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
return mTaskbarView.getTaskbarDividerView();
}
/** Updates which icons are marked as running given the Set of currently running packages. */
public void updateIconViewsRunningStates(Set<String> runningPackages) {
for (View iconView : getIconViews()) {
if (iconView instanceof BubbleTextView btv) {
btv.updateRunningState(runningPackages.contains(btv.getTargetPackageName()));
}
}
}
/**
* Defers any updates to the UI for the setup wizard animation.
*/