Fix RequestPinItemTest, broken by my manual merge.

Bug: 139880994
Change-Id: I7f6e1dda6cf4497bccf7ea682739bacd12079d4d
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 9f05795..fb80537 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -137,7 +137,15 @@
                 if (DBG) {
                     Log.d(TAG, "Ignoring shortcut for absent package: " + info.launchIntent);
                 }
+                continue;
             }
+
+            // Generate a shortcut info to add into the model
+            installQueue.add(info.getItemInfo());
+        }
+        prefs.edit().remove(APPS_PENDING_INSTALL).apply();
+        if (!installQueue.isEmpty()) {
+            model.addAndBindAddedWorkspaceItems(installQueue);
         }
     }
 
diff --git a/src/com/android/launcher3/model/AddWorkspaceItemsTask.java b/src/com/android/launcher3/model/AddWorkspaceItemsTask.java
index 6e60773..dfd5a70 100644
--- a/src/com/android/launcher3/model/AddWorkspaceItemsTask.java
+++ b/src/com/android/launcher3/model/AddWorkspaceItemsTask.java
@@ -124,13 +124,11 @@
                             // App was installed while launcher was in the background.
                             itemInfo = new AppInfo(app.getContext(), activities.get(0), item.user)
                                     .makeWorkspaceItem();
-                            PackageItemInfo info = new PackageItemInfo(packageName);
                             WorkspaceItemInfo wii = (WorkspaceItemInfo) itemInfo;
-                            app.getIconCache().getTitleAndIconForApp(info, wii.usingLowResIcon());
-                            wii.title = info.title;
-                            wii.contentDescription = info.contentDescription;
-                            wii.iconBitmap = info.iconBitmap;
-                            wii.iconColor = info.iconColor;
+                            wii.title = "";
+                            wii.applyFrom(app.getIconCache().getDefaultIcon(item.user));
+                            app.getIconCache().getTitleAndIcon(wii,
+                                    ((WorkspaceItemInfo) itemInfo).usingLowResIcon());
                         } else {
                             // Session was cancelled, do not add.
                             continue;