Remove notification dot if app is disabled
For instance, when turning off work profile, all work profile apps are
disabled and notifications are removed. Previously, we weren't updating
the dots in this case because we ignore unsupported ItemInfos (e.g.
disabled items in this case).
Note that this was only user-visible for Folders, because regular
shortcuts were updated when the disabled state changes.
Bug: 111791593
Change-Id: I3c49e6e3bf18753a868eb993b29c77abbefd3466
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 8a39b3b..c2f445b 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -3174,9 +3174,9 @@
mapOverItems(MAP_RECURSE, new ItemOperator() {
@Override
public boolean evaluate(ItemInfo info, View v) {
- if (info instanceof ShortcutInfo && v instanceof BubbleTextView
- && packageUserKey.updateFromItemInfo(info)) {
- if (updatedDots.contains(packageUserKey)) {
+ if (info instanceof ShortcutInfo && v instanceof BubbleTextView) {
+ if (!packageUserKey.updateFromItemInfo(info)
+ || updatedDots.contains(packageUserKey)) {
((BubbleTextView) v).applyDotState(info, true /* animate */);
folderIds.add(info.container);
}