Dominant color is part of icon cache

> Calculating extracted color during icon generation and storing it in model and DB
> Removing unused logic avoid various types of badge rendering
> Icons are badged with extracted colors, while folder is badged with theme color

Bug: 35428783
Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
This commit is contained in:
Sunny Goyal
2017-12-19 16:49:24 -08:00
parent 8c3c9d2634
commit 179249d804
37 changed files with 392 additions and 533 deletions

View File

@@ -472,12 +472,12 @@ public class LoaderTask implements Runnable {
public Bitmap get() {
// If the pinned deep shortcut is no longer published,
// use the last saved icon instead of the default.
return c.loadIcon(finalInfo);
return c.loadIcon(finalInfo)
? finalInfo.iconBitmap : null;
}
};
info.iconBitmap = LauncherIcons
.createShortcutIcon(pinnedShortcut, context,
true /* badged */, fallbackIconProvider);
LauncherIcons.createShortcutIcon(pinnedShortcut, context,
true /* badged */, fallbackIconProvider).applyTo(info);
if (pmHelper.isAppSuspended(
pinnedShortcut.getPackage(), info.user)) {
info.runtimeStatusFlags |= FLAG_DISABLED_SUSPENDED;