From 1e58cd727013bcc294c22216fa70513c6263b37d Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 4 Dec 2018 14:03:32 -0800 Subject: [PATCH] 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 --- src/com/android/launcher3/Workspace.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 8a39b3b40f..c2f445b53a 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -3174,9 +3174,9 @@ public class Workspace extends PagedView 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); }