summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/InstallShortcutReceiver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/InstallShortcutReceiver.java')
-rw-r--r--src/com/android/launcher3/InstallShortcutReceiver.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 5422de951..0c69154aa 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -210,7 +210,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
// Add the new apps to the model and bind them
if (!addShortcuts.isEmpty()) {
LauncherAppState app = LauncherAppState.getInstance();
- app.getModel().addAndBindAddedWorkspaceApps(context, addShortcuts);
+ app.getModel().addAndBindAddedWorkspaceItems(context, addShortcuts);
}
}
}
@@ -352,16 +352,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
public ShortcutInfo getShortcutInfo() {
if (activityInfo != null) {
- final ShortcutInfo info = new ShortcutInfo();
- info.user = user;
- info.title = label;
- info.contentDescription = label;
- info.customIcon = false;
- info.intent = launchIntent;
- info.itemType = LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
- info.flags = AppInfo.initFlags(activityInfo);
- info.firstInstallTime = activityInfo.getFirstInstallTime();
- return info;
+ return ShortcutInfo.fromActivityInfo(activityInfo, mContext);
} else {
return LauncherAppState.getInstance().getModel().infoFromShortcutIntent(mContext, data);
}