If activity is an alias get maxRecents from target
Activity aliases do not pick up values in the PackageParser. The actual values should come from the target activity instead. Also ActivityInfo now propagates maxRecents in copy constructor and across Binder calls (via parcelling). Fixes bug 17391328. Change-Id: I35d248032eca7557528c9d499b3b38f27c713d09
This commit is contained in:
@@ -657,6 +657,7 @@ public class ActivityInfo extends ComponentInfo
|
||||
softInputMode = orig.softInputMode;
|
||||
uiOptions = orig.uiOptions;
|
||||
parentActivityName = orig.parentActivityName;
|
||||
maxRecents = orig.maxRecents;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -728,6 +729,7 @@ public class ActivityInfo extends ComponentInfo
|
||||
dest.writeInt(uiOptions);
|
||||
dest.writeString(parentActivityName);
|
||||
dest.writeInt(persistableMode);
|
||||
dest.writeInt(maxRecents);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<ActivityInfo> CREATOR
|
||||
@@ -754,5 +756,6 @@ public class ActivityInfo extends ComponentInfo
|
||||
uiOptions = source.readInt();
|
||||
parentActivityName = source.readString();
|
||||
persistableMode = source.readInt();
|
||||
maxRecents = source.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3308,7 +3308,8 @@ public class PackageParser {
|
||||
info.softInputMode = target.info.softInputMode;
|
||||
info.uiOptions = target.info.uiOptions;
|
||||
info.parentActivityName = target.info.parentActivityName;
|
||||
|
||||
info.maxRecents = target.info.maxRecents;
|
||||
|
||||
Activity a = new Activity(mParseActivityAliasArgs, info);
|
||||
if (outError[0] != null) {
|
||||
sa.recycle();
|
||||
|
||||
Reference in New Issue
Block a user