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

@@ -32,6 +32,7 @@ import com.android.launcher3.shortcuts.ShortcutInfoCompat;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.ItemInfoMatcher;
import com.android.launcher3.util.Provider;
import java.util.ArrayList;
import java.util.HashMap;
@@ -91,8 +92,10 @@ public class UserLockStateChangedTask extends BaseModelUpdateTask {
}
si.runtimeStatusFlags &= ~FLAG_DISABLED_LOCKED_USER;
si.updateFromDeepShortcutInfo(shortcut, context);
si.iconBitmap = LauncherIcons.createShortcutIcon(shortcut, context,
si.iconBitmap);
// If the shortcut is pinned but no longer has an icon in the system,
// keep the current icon instead of reverting to the default icon.
LauncherIcons.createShortcutIcon(shortcut, context, true,
Provider.of(si.iconBitmap)).applyTo(si);
} else {
si.runtimeStatusFlags |= FLAG_DISABLED_LOCKED_USER;
}