Merge "Don't override targetVers with minCode"

This commit is contained in:
Colin Cross
2018-06-19 18:14:39 +00:00
committed by Gerrit Code Review

View File

@@ -96,8 +96,8 @@ import com.android.internal.util.ArrayUtils;
import com.android.internal.util.XmlUtils;
import libcore.io.IoUtils;
import libcore.util.EmptyArray;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -2340,10 +2340,10 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestUsesSdk_minSdkVersion);
if (val != null) {
if (val.type == TypedValue.TYPE_STRING && val.string != null) {
targetCode = minCode = val.string.toString();
minCode = val.string.toString();
} else {
// If it's not a string, it's an integer.
targetVers = minVers = val.data;
minVers = val.data;
}
}
@@ -2359,6 +2359,9 @@ public class PackageParser {
// If it's not a string, it's an integer.
targetVers = val.data;
}
} else {
targetVers = minVers;
targetCode = minCode;
}
sa.recycle();