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
This commit is contained in:
Tony Wickham
2018-12-04 14:03:32 -08:00
parent f34bee819c
commit 1e58cd7270

View File

@@ -3174,9 +3174,9 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
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);
}