Merge "Remove badge info from map when count is 0." into ub-launcher3-dorval

This commit is contained in:
Tony Wickham
2017-03-13 18:56:17 +00:00
committed by Android (Google) Code Review
@@ -75,6 +75,9 @@ public class PopupDataProvider implements NotificationListener.NotificationsChan
notificationWasAddedOrRemoved = shouldBeFilteredOut
? badgeInfo.removeNotificationKey(notificationKey)
: badgeInfo.addNotificationKeyIfNotExists(notificationKey);
if (badgeInfo.getNotificationCount() == 0) {
mPackageUserToBadgeInfos.remove(postedPackageUserKey);
}
}
updateLauncherIconBadges(Utilities.singletonHashSet(postedPackageUserKey),
notificationWasAddedOrRemoved);