Show notification icon in place of "1" in badge.

- When notifications update, add the NotificationInfo to the
  BadgeInfo if there is only one for an app. BadgeRenderer
  will use the NotificationInfo to get the icon to draw.
- When retrieving the icon from the NotificationInfo, we draw
  it into a shader (similar to MaskableIconDrawable), which is
  rendered by BadgeRenderer.
- For now, we only use the notification icon if it is large.

Bug: 34839959
Bug: 32410600
Bug: 33553066
Change-Id: I31851804008dd15bab75d2759441187830c3265e
This commit is contained in:
Tony Wickham
2017-01-31 10:49:18 -08:00
parent e1fa0145d3
commit a799bed803
8 changed files with 208 additions and 28 deletions

View File

@@ -196,9 +196,7 @@ public class DeviceProfile {
hotseatBarBottomPaddingPx = 0;
hotseatLandGutterPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_gutter_width);
int badgeSize = res.getDimensionPixelSize(R.dimen.badge_size);
int badgeTextSize = res.getDimensionPixelSize(R.dimen.badge_text_size);
mBadgeRenderer = new BadgeRenderer(badgeSize, badgeTextSize);
mBadgeRenderer = new BadgeRenderer(context);
// Determine sizes.
widthPx = width;