Allow a root activity to relinquish task identity
If a an acitivty with attribute android:relinquishTaskIdentity true
is the root activity of a task then the intent of that task will
be that of the first activity in the stack with
android:relinquishTaskIdentity set false.
The ability to set intent also includes the ability to set the
TaskDescription of the task.
Fixes bug 15675610.
Fixes bug 10428661.
Change-Id: Ib28a9eae3b9832eeeef9106adbebe344184ee5ae
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 0b336d0..b40a441 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -2629,6 +2629,12 @@
false)) {
a.info.flags |= ActivityInfo.FLAG_AUTO_REMOVE_FROM_RECENTS;
}
+
+ if (sa.getBoolean(
+ com.android.internal.R.styleable.AndroidManifestActivity_relinquishTaskIdentity,
+ false)) {
+ a.info.flags |= ActivityInfo.FLAG_RELINQUISH_TASK_IDENTITY;
+ }
} else {
a.info.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
a.info.configChanges = 0;