Storing BitmapInfo instead of icon and color directly in itemInfo

This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread

Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
This commit is contained in:
Sunny Goyal
2019-10-25 13:41:28 -07:00
parent 0d9752c647
commit 3808a69a6c
35 changed files with 135 additions and 149 deletions

View File

@@ -92,7 +92,7 @@ public class UserLockStateChangedTask extends BaseModelUpdateTask {
// 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 li = LauncherIcons.obtain(context);
si.applyFrom(li.createShortcutIcon(shortcut, true, () -> si));
si.bitmap = li.createShortcutIcon(shortcut, true, () -> si);
li.recycle();
} else {
si.runtimeStatusFlags |= FLAG_DISABLED_LOCKED_USER;