summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRobert Carr <racarr@google.com>2015-09-15 12:30:42 -0700
committerRob Carr <racarr@google.com>2015-10-20 17:48:11 +0000
commit8ab115a9aaf96cd165c683bfd8a47cfda1239f82 (patch)
tree1e33c84ae3510249cb8f27f6b9f6ba8bfe527bc5 /core
parent1a4efb77dd3c503634f1f6495d931d1a570f51f5 (diff)
downloadframeworks_base-8ab115a9aaf96cd165c683bfd8a47cfda1239f82.zip
frameworks_base-8ab115a9aaf96cd165c683bfd8a47cfda1239f82.tar.gz
frameworks_base-8ab115a9aaf96cd165c683bfd8a47cfda1239f82.tar.bz2
Correct ActivityInfo constructors.
ActivityInfo was missing initialization for the documentLaunchMode flag in the copy-constructor and the Parcel constructor. The copy-constructor is used in multi-user/profile mode to create a seperate instance of the ActivityInfo per uid and this was manifesting in the linked bug. Bug: 21590916 Change-Id: I6f71d94ec32ec6326d23c9b62e9d8d319e2fa25e (cherry picked from commit 3e2e0117858eb02fef55ca4c245e8b920aedc6eb)
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/pm/ActivityInfo.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 43cc63b..e798eb8 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -33,12 +33,16 @@ import java.lang.annotation.RetentionPolicy;
*/
public class ActivityInfo extends ComponentInfo
implements Parcelable {
+
+ // NOTE: When adding new data members be sure to update the copy-constructor, Parcel
+ // constructor, and writeToParcel.
+
/**
* A style resource identifier (in the package's resources) of this
* activity's theme. From the "theme" attribute or, if not set, 0.
*/
public int theme;
-
+
/**
* Constant corresponding to <code>standard</code> in
* the {@link android.R.attr#launchMode} attribute.
@@ -705,6 +709,7 @@ public class ActivityInfo extends ComponentInfo
super(orig);
theme = orig.theme;
launchMode = orig.launchMode;
+ documentLaunchMode = orig.documentLaunchMode;
permission = orig.permission;
taskAffinity = orig.taskAffinity;
targetActivity = orig.targetActivity;
@@ -780,6 +785,7 @@ public class ActivityInfo extends ComponentInfo
super.writeToParcel(dest, parcelableFlags);
dest.writeInt(theme);
dest.writeInt(launchMode);
+ dest.writeInt(documentLaunchMode);
dest.writeString(permission);
dest.writeString(taskAffinity);
dest.writeString(targetActivity);
@@ -809,6 +815,7 @@ public class ActivityInfo extends ComponentInfo
super(source);
theme = source.readInt();
launchMode = source.readInt();
+ documentLaunchMode = source.readInt();
permission = source.readString();
taskAffinity = source.readString();
targetActivity = source.readString();