update placeholder on package install or restore

Bug: 10778992
Change-Id: I3293d8bab8ae0ef49fc5554531bba5bd6f70932c
This commit is contained in:
Chris Wren
2014-01-27 14:17:08 -05:00
parent c87c21a0cd
commit b6d4c2827a
5 changed files with 88 additions and 4 deletions

View File

@@ -4612,11 +4612,15 @@ public class Workspace extends SmoothPagedView
private void updateShortcut(HashMap<ComponentName, AppInfo> appsMap, ItemInfo info,
View child) {
ComponentName cn = info.getIntent().getComponent();
if (info.getRestoredIntent() != null) {
cn = info.getRestoredIntent().getComponent();
}
if (cn != null) {
AppInfo appInfo = appsMap.get(info.getIntent().getComponent());
AppInfo appInfo = appsMap.get(cn);
if ((appInfo != null) && LauncherModel.isShortcutInfoUpdateable(info)) {
ShortcutInfo shortcutInfo = (ShortcutInfo) info;
BubbleTextView shortcut = (BubbleTextView) child;
shortcutInfo.restore();
shortcutInfo.updateIcon(mIconCache);
shortcutInfo.title = appInfo.title.toString();
shortcut.applyFromShortcutInfo(shortcutInfo, mIconCache);