Merge "Pass APK_IN_APEX flag when parsing apk in apexes" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
938c3d933f
@@ -567,9 +567,14 @@ public class ApkLiteParseUtils {
|
||||
targetCode = minCode;
|
||||
}
|
||||
|
||||
boolean allowUnknownCodenames = false;
|
||||
if ((flags & FrameworkParsingPackageUtils.PARSE_APK_IN_APEX) != 0) {
|
||||
allowUnknownCodenames = true;
|
||||
}
|
||||
|
||||
ParseResult<Integer> targetResult = FrameworkParsingPackageUtils.computeTargetSdkVersion(
|
||||
targetVer, targetCode, SDK_CODENAMES, input,
|
||||
/* allowUnknownCodenames= */ false);
|
||||
allowUnknownCodenames);
|
||||
if (targetResult.isError()) {
|
||||
return input.error(targetResult);
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ public class FrameworkParsingPackageUtils {
|
||||
private static final int MAX_FILE_NAME_SIZE = 223;
|
||||
|
||||
public static final int PARSE_IGNORE_OVERLAY_REQUIRED_SYSTEM_PROPERTY = 1 << 7;
|
||||
public static final int PARSE_APK_IN_APEX = 1 << 9;
|
||||
|
||||
/**
|
||||
* Check if the given name is valid.
|
||||
|
||||
@@ -392,6 +392,9 @@ public class ParsingPackageUtils {
|
||||
if ((flags & PARSE_FRAMEWORK_RES_SPLITS) != 0) {
|
||||
liteParseFlags = flags;
|
||||
}
|
||||
if ((flags & PARSE_APK_IN_APEX) != 0) {
|
||||
liteParseFlags |= PARSE_APK_IN_APEX;
|
||||
}
|
||||
final ParseResult<PackageLite> liteResult =
|
||||
ApkLiteParseUtils.parseClusterPackageLite(input, packageDir, frameworkSplits,
|
||||
liteParseFlags);
|
||||
|
||||
Reference in New Issue
Block a user