Merge "Allow pre-R apps to test compressed ARSC error" into rvc-dev am: e3c40062e6 am: f40f3edd2f

Change-Id: I465ad0558a16d13221053b9065e9321889487145
This commit is contained in:
Ryan Mitchell
2020-04-30 00:29:05 +00:00
committed by Automerger Merge Worker

View File

@@ -346,12 +346,11 @@ public class ParsingPackageUtils {
} }
final ParsingPackage pkg = result.getResult(); final ParsingPackage pkg = result.getResult();
if (pkg.getTargetSdkVersion() >= Build.VERSION_CODES.R if (assets.containsAllocatedTable()) {
&& assets.containsAllocatedTable()) {
final ParseResult<?> deferResult = input.deferError( final ParseResult<?> deferResult = input.deferError(
"Targeting R+ (version" + Build.VERSION_CODES.R + " and above) requires the" "Targeting R+ (version " + Build.VERSION_CODES.R + " and above) requires"
+ " resources.arsc of installed APKs to be stored uncompressed and" + " the resources.arsc of installed APKs to be stored uncompressed"
+ " aligned on a 4-byte boundary", + " and aligned on a 4-byte boundary",
DeferredError.RESOURCES_ARSC_COMPRESSED); DeferredError.RESOURCES_ARSC_COMPRESSED);
if (deferResult.isError()) { if (deferResult.isError()) {
return input.error(INSTALL_PARSE_FAILED_RESOURCES_ARSC_COMPRESSED, return input.error(INSTALL_PARSE_FAILED_RESOURCES_ARSC_COMPRESSED,