Small correction to previous CL, set item type
Bug 18580158
Change-Id: I5167bb2f1a2f23da6ceb40fa9a38b070a640c93d
diff --git a/src/com/android/launcher2/ApplicationInfo.java b/src/com/android/launcher2/ApplicationInfo.java
index 7b96ed8..f81c3cb 100644
--- a/src/com/android/launcher2/ApplicationInfo.java
+++ b/src/com/android/launcher2/ApplicationInfo.java
@@ -84,6 +84,7 @@
intent.setComponent(info.getComponentName());
intent.putExtra(EXTRA_PROFILE, user);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+ itemType = LauncherSettings.BaseLauncherColumns.ITEM_TYPE_APPLICATION;
updateUser(intent);
}
@@ -96,21 +97,6 @@
firstInstallTime = info.firstInstallTime;
}
- /**
- * Creates the application intent based on a component name and various launch flags.
- * Sets {@link #itemType} to {@link LauncherSettings.BaseLauncherColumns#ITEM_TYPE_APPLICATION}.
- *
- * @param className the class name of the component representing the intent
- * @param launchFlags the launch flags
- */
- final void setActivity(ComponentName className, int launchFlags) {
- intent = new Intent(Intent.ACTION_MAIN);
- intent.addCategory(Intent.CATEGORY_LAUNCHER);
- intent.setComponent(className);
- intent.setFlags(launchFlags);
- itemType = LauncherSettings.BaseLauncherColumns.ITEM_TYPE_APPLICATION;
- }
-
@Override
public String toString() {
return "ApplicationInfo(title=" + title.toString() + " P=" + user + ")";