diff options
| author | Ryan Mitchell <rtmitchell@google.com> | 2020-04-28 10:53:40 -0700 |
|---|---|---|
| committer | Ryan Mitchell <rtmitchell@google.com> | 2020-04-28 11:13:51 -0700 |
| commit | 72e144cd18094c70769b344d2cbb15f6f5a68f03 (patch) | |
| tree | d127f4ad389ccb01c056e9b97184afa444d5db7a /core/java/android | |
| parent | ac774e3304d1c52d1f9057aabaa39bcb1249c656 (diff) | |
Allow pre-R apps to test compressed ARSC error
This change removes the initial target SDK check which prevents apps
that target pre-Q from testing that they fail to be install if the
compatibility change is enabled for pre-Q packages.
Bug: 132742131
Test: adb shell am compat enable 132742131 for app with compressed ARSC
that targets pre-R
Change-Id: I7e568a9e99045c09565bb372e454f573b954fea5
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/parsing/ParsingPackageUtils.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/content/pm/parsing/ParsingPackageUtils.java b/core/java/android/content/pm/parsing/ParsingPackageUtils.java index c61362feaeae..770d08d3b84d 100644 --- a/core/java/android/content/pm/parsing/ParsingPackageUtils.java +++ b/core/java/android/content/pm/parsing/ParsingPackageUtils.java @@ -346,12 +346,11 @@ public class ParsingPackageUtils { } final ParsingPackage pkg = result.getResult(); - if (pkg.getTargetSdkVersion() >= Build.VERSION_CODES.R - && assets.containsAllocatedTable()) { + if (assets.containsAllocatedTable()) { final ParseResult<?> deferResult = input.deferError( - "Targeting R+ (version" + Build.VERSION_CODES.R + " and above) requires the" - + " resources.arsc of installed APKs to be stored uncompressed and" - + " aligned on a 4-byte boundary", + "Targeting R+ (version " + Build.VERSION_CODES.R + " and above) requires" + + " the resources.arsc of installed APKs to be stored uncompressed" + + " and aligned on a 4-byte boundary", DeferredError.RESOURCES_ARSC_COMPRESSED); if (deferResult.isError()) { return input.error(INSTALL_PARSE_FAILED_RESOURCES_ARSC_COMPRESSED, |
