Drawing a shortcut icon on a white round-rect with shadow
Also center aligning the preview
Bug: 34819119
Change-Id: Ic25be6bf301aeb11315a5050f009259b26c6134a
Before we were calling setBackgroundColor() in the update
listener, which is less efficient because it creates a
new ColorDrawable; now we reuse one throughout.
Change-Id: I0cd87e5ee72af41d2dae4375ce3df9fd6e92bd82
The Set returned by Collections.singleton() doesn't support all
operations, causing crashes in certain situations (namely, whenever
a notification is updated rather than added or removed).
Change-Id: Ie104b7f99c4a32db5f1f7e43ec3775d34dc26ce1
Using standard theme attributes rather than custom color codes, so
that it plays nice with system theme changes.
Bug: 34819119
Bug: 34897402
Bug: 21446746
Change-Id: I265fba3ceae8873650fd09e4704838d313155e83
We draw a while round rect box which is divided into the cells to
represent the widget size. The app icon is drawn in the center
for this white box.
Bug: 34819119
Change-Id: Ie4d83712577f21b276c6744a55993f71da368398
- Scale the badge and text or icon up or down, respectively.
- Only animate if the badge is visible, and don't animate when
applying shortcut or app info.
- Animate folder badge out when folder enters accepting state.
Bug: 34838365
Bug: 32410600
Change-Id: Ie60cb1fc54fe60d72734d833040545d27660d645
- Log notification launches
- Log notification swipes
- Fix logDragNDrop() to only log if the pre-drag ends (so it doesn't
log a long-press that only shows shortcuts without dragging).
- Add shortcut rank to logs when launching deep shortcuts, where 0
is the shortcut closest to the app icon (highest rank).
Bug: 34770729
Bug: 32410600
Change-Id: I99dcef9b6a71da2ef58e32397702bb137407b10f
- The folder badge contains the sum of the badge counts within.
- This is represented by FolderBadgeInfo, a subclass of BadgeInfo.
Bug: 34828806
Bug: 32410600
Change-Id: I977a69cc7baf80a7207af9adf98dddb0a3509c47
- 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
> The drawable gets the path from MaskIconDrawable path, instead of
using a circle
> The progress changes are animated as well
Bug: 34831873
Change-Id: I4e7f0b610f4fd94de8e0cfcf8b179b775cf0b4d8
PackageUserKey is only meant to be used for items that support
notifications, so when trying to update it for an item that
doesn't, we don't use it to check if the item has notifications.
This fixes a crash that happens when trying to update notifications
for a legacy shortcut, as such a shortcut doesn't have a component
on its intent, which we were trying to use to populate PackageUserKey.
Bug: 34842278
Change-Id: I8c69ccebbf9d93505d5b29ecd25d76c65610ddc4