Fix regression wherein correct activity flags weren't being set
Bug 18580158
Change-Id: I793faa7b5c85977a75ce4bc591cde90643442bb7
diff --git a/src/com/android/launcher2/ApplicationInfo.java b/src/com/android/launcher2/ApplicationInfo.java
index b9a1e56..7b96ed8 100644
--- a/src/com/android/launcher2/ApplicationInfo.java
+++ b/src/com/android/launcher2/ApplicationInfo.java
@@ -69,8 +69,6 @@
this.componentName = info.getComponentName();
this.container = ItemInfo.NO_ID;
- this.setActivity(componentName,
- Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
int appFlags = info.getApplicationInfo().flags;
if ((appFlags & android.content.pm.ApplicationInfo.FLAG_SYSTEM) == 0) {
@@ -85,6 +83,7 @@
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(info.getComponentName());
intent.putExtra(EXTRA_PROFILE, user);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
updateUser(intent);
}