Using persisted item storage for install queue.

Shared prefs are loaded during startup and should avoid large objects

Change-Id: Ibb5c8307dbccb9414b42454825e6c3c2a972efa6
This commit is contained in:
Sunny Goyal
2020-08-12 14:38:23 -07:00
parent a92c26b161
commit 104c9d1206
3 changed files with 74 additions and 148 deletions

View File

@@ -297,8 +297,7 @@ public class BgDataModel {
.filter(wi -> wi.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT)
.map(ShortcutKey::fromItemInfo),
// Pending shortcuts
ItemInstallQueue.INSTANCE.get(context).getPendingShortcuts()
.stream().filter(si -> si.user.equals(user)))
ItemInstallQueue.INSTANCE.get(context).getPendingShortcuts(user))
.collect(groupingBy(ShortcutKey::getPackageName,
mapping(ShortcutKey::getId, Collectors.toSet())));