Use deep shortcuts' icons as a fallback when updating

We already do this when loading, but now we also do it when
getting callbacks that potentially change the shortcut icon.
These callbacks first check the pinned shortcut info, but if
there is no icon there we now fall back to the current icon
instead of the default icon.

Bug: 62814533
Change-Id: I777adedf4b7f93dbaddb98a993eda34d59dcc173
This commit is contained in:
Tony
2017-07-28 16:11:36 -07:00
parent 2ed276eb13
commit a8ccf09597
3 changed files with 18 additions and 4 deletions

View File

@@ -85,10 +85,10 @@ public class ShortcutsChangedTask extends BaseModelUpdateTask {
removedShortcutInfos.addAll(shortcutInfos);
continue;
}
for (ShortcutInfo shortcutInfo : shortcutInfos) {
for (final ShortcutInfo shortcutInfo : shortcutInfos) {
shortcutInfo.updateFromDeepShortcutInfo(fullDetails, context);
shortcutInfo.iconBitmap =
LauncherIcons.createShortcutIcon(fullDetails, context);
shortcutInfo.iconBitmap = LauncherIcons.createShortcutIcon(fullDetails, context,
shortcutInfo.iconBitmap);
updatedShortcutInfos.add(shortcutInfo);
}
}