OSDN Git Service

Merge "Allow max aspect ratio to be specified by meta-data tag." into oc-dr1-dev...
authorBryce Lee <brycelee@google.com>
Thu, 13 Jul 2017 17:55:05 +0000 (17:55 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Thu, 13 Jul 2017 17:55:05 +0000 (17:55 +0000)
am: d0bc21efd5

Change-Id: Idf2bfb1d6c2b70a53ebe46df300be6fe3fce3258

1  2 
core/java/android/content/pm/PackageParser.java

@@@ -3658,10 -3640,8 +3660,11 @@@ public class PackageParser 
          }
  
          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;