}
final int innerDepth = parser.getDepth();
+ // IMPORTANT: These must only be cached for a single <application> to avoid components
+ // getting added to the wrong package.
+ final CachedComponentArgs cachedArgs = new CachedComponentArgs();
int type;
+
while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
&& (type != XmlPullParser.END_TAG || parser.getDepth() > innerDepth)) {
if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
info.windowLayout = target.info.windowLayout;
info.resizeMode = target.info.resizeMode;
info.maxAspectRatio = target.info.maxAspectRatio;
+
info.encryptionAware = info.directBootAware = target.info.directBootAware;
- Activity a = new Activity(mParseActivityAliasArgs, info);
+ Activity a = new Activity(cachedArgs.mActivityAliasArgs, info);
if (outError[0] != null) {
sa.recycle();
return null;