diff options
author | Tony Wickham <twickham@google.com> | 2017-06-07 14:32:23 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2017-06-08 21:08:47 +0000 |
commit | 7092db02410562026da17a7b38f48025cc847de2 (patch) | |
tree | f1c0c5a50594ce890109bdb25dd0346dee9cbf6d /src/com/android/launcher3/popup | |
parent | 85b64c7da0f1134fdbae954acbc2925c1433566a (diff) | |
download | android_packages_apps_Trebuchet-7092db02410562026da17a7b38f48025cc847de2.tar.gz android_packages_apps_Trebuchet-7092db02410562026da17a7b38f48025cc847de2.tar.bz2 android_packages_apps_Trebuchet-7092db02410562026da17a7b38f48025cc847de2.zip |
Add support for color extracted notification dots
Changing the badge_color in colors.xml to transparent
will cause them to be color extracted.
When an extracted color is used in the IconPalette, we
desaturate the background. Otherwise we respect the
exact color specified in colors.xml.
Change-Id: Ie82d0c5335fa5f24d4cc47766e4c1719c4916f8b
Diffstat (limited to 'src/com/android/launcher3/popup')
-rw-r--r-- | src/com/android/launcher3/popup/PopupContainerWithArrow.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index ccead37dc..4488f6634 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -47,7 +47,6 @@ import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.DragSource; import com.android.launcher3.DropTarget; -import com.android.launcher3.FastBitmapDrawable; import com.android.launcher3.ItemInfo; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAnimUtils; @@ -579,9 +578,7 @@ public class PopupContainerWithArrow extends AbstractFloatingView implements Dra ItemInfo itemInfo = (ItemInfo) mOriginalIcon.getTag(); BadgeInfo badgeInfo = mLauncher.getPopupDataProvider().getBadgeInfoForItem(itemInfo); if (mNotificationItemView != null && badgeInfo != null) { - IconPalette palette = mOriginalIcon.getIcon() instanceof FastBitmapDrawable - ? ((FastBitmapDrawable) mOriginalIcon.getIcon()).getIconPalette() - : null; + IconPalette palette = mOriginalIcon.getBadgePalette(); mNotificationItemView.updateHeader(badgeInfo.getNotificationCount(), palette); } } |