Persist the updated item to DB when a shortcut info is badged for the first time

Bug: 110016648
Change-Id: I8e36b80e9c893de91bce208ceac93a3fcdb557d5
This commit is contained in:
Sunny Goyal
2018-06-21 09:59:08 -07:00
parent 48010091f4
commit f266deb24c

View File

@@ -640,6 +640,7 @@ public class LauncherModel extends BroadcastReceiver
@Override
public void execute(LauncherAppState app, BgDataModel dataModel, AllAppsList apps) {
ShortcutInfo info = shortcutProvider.get();
getModelWriter().updateItemInDatabase(info);
ArrayList<ShortcutInfo> update = new ArrayList<>();
update.add(info);
bindUpdatedShortcuts(update, info.user);