aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-06-25 13:35:30 -0700
committerLuca Stefani <luca.stefani.ge1@gmail.com>2020-02-01 22:33:32 +0100
commitbea1d1a572535b64d46dfde6b5ee188709d3a099 (patch)
tree09af1d44fca843c2ee60fb8053ba12189661f3a7
parenta7c950462cb94a88be5826848e896078193adc4a (diff)
downloadbuild_soong-bea1d1a572535b64d46dfde6b5ee188709d3a099.tar.gz
build_soong-bea1d1a572535b64d46dfde6b5ee188709d3a099.tar.bz2
build_soong-bea1d1a572535b64d46dfde6b5ee188709d3a099.zip
Uncompress dex in unbundled privileged apps
Mainline builds privileged apps unbundled and then uses them as prebuilts, so they need to respect the privileged flag when deciding whether or not to uncompress the dex. Bug: 135772877 Test: TestUncompressDex Change-Id: I91da7116b779ae35c0617ef77dbcb9788902370c
-rw-r--r--java/app.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/java/app.go b/java/app.go
index 7e38f877..fdea4350 100644
--- a/java/app.go
+++ b/java/app.go
@@ -197,15 +197,16 @@ func (a *AndroidApp) shouldUncompressDex(ctx android.ModuleContext) bool {
return true
}
- if ctx.Config().UnbundledBuild() {
- return false
- }
-
- // Uncompress dex in APKs of privileged apps
+ // Uncompress dex in APKs of privileged apps (even for unbundled builds, they may
+ // be preinstalled as prebuilts).
if ctx.Config().UncompressPrivAppDex() && Bool(a.appProperties.Privileged) {
return true
}
+ if ctx.Config().UnbundledBuild() {
+ return false
+ }
+
return shouldUncompressDex(ctx, &a.dexpreopter)
}