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;
|
targetCode = minCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean allowUnknownCodenames = false;
|
||||||
|
if ((flags & FrameworkParsingPackageUtils.PARSE_APK_IN_APEX) != 0) {
|
||||||
|
allowUnknownCodenames = true;
|
||||||
|
}
|
||||||
|
|
||||||
ParseResult<Integer> targetResult = FrameworkParsingPackageUtils.computeTargetSdkVersion(
|
ParseResult<Integer> targetResult = FrameworkParsingPackageUtils.computeTargetSdkVersion(
|
||||||
targetVer, targetCode, SDK_CODENAMES, input,
|
targetVer, targetCode, SDK_CODENAMES, input,
|
||||||
/* allowUnknownCodenames= */ false);
|
allowUnknownCodenames);
|
||||||
if (targetResult.isError()) {
|
if (targetResult.isError()) {
|
||||||
return input.error(targetResult);
|
return input.error(targetResult);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public class FrameworkParsingPackageUtils {
|
|||||||
private static final int MAX_FILE_NAME_SIZE = 223;
|
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_IGNORE_OVERLAY_REQUIRED_SYSTEM_PROPERTY = 1 << 7;
|
||||||
|
public static final int PARSE_APK_IN_APEX = 1 << 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the given name is valid.
|
* Check if the given name is valid.
|
||||||
|
|||||||
@@ -392,6 +392,9 @@ public class ParsingPackageUtils {
|
|||||||
if ((flags & PARSE_FRAMEWORK_RES_SPLITS) != 0) {
|
if ((flags & PARSE_FRAMEWORK_RES_SPLITS) != 0) {
|
||||||
liteParseFlags = flags;
|
liteParseFlags = flags;
|
||||||
}
|
}
|
||||||
|
if ((flags & PARSE_APK_IN_APEX) != 0) {
|
||||||
|
liteParseFlags |= PARSE_APK_IN_APEX;
|
||||||
|
}
|
||||||
final ParseResult<PackageLite> liteResult =
|
final ParseResult<PackageLite> liteResult =
|
||||||
ApkLiteParseUtils.parseClusterPackageLite(input, packageDir, frameworkSplits,
|
ApkLiteParseUtils.parseClusterPackageLite(input, packageDir, frameworkSplits,
|
||||||
liteParseFlags);
|
liteParseFlags);
|
||||||
|
|||||||
Reference in New Issue
Block a user