Support notifications with 0 count (show as dots)

- Show number if number > 0
- Show icon if number == 0 and a notification specified an icon to show
- Show a dot otherwise
- In cases of multiple notifications, stack a second badge behind the
  first (visuals will be updated in future CL, as well as support
  stacked dots)
- Folders always show dot if any app within has a badge.

Change-Id: I0a89059b0e0a0d174fe739c9da4f75fa18c0edfa
This commit is contained in:
Tony Wickham
2017-04-26 18:13:56 -07:00
committed by Tony
parent b85f5dfcba
commit 0530e8c608
8 changed files with 96 additions and 45 deletions

View File

@@ -37,7 +37,7 @@ public class NotificationKeyData {
private NotificationKeyData(String notificationKey, String shortcutId, int count) {
this.notificationKey = notificationKey;
this.shortcutId = shortcutId;
this.count = Math.max(1, count);
this.count = count;
}
public static NotificationKeyData fromNotification(StatusBarNotification sbn) {