summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Jared Duke <jdduke@google.com> 2024-02-09 18:45:24 +0000
committer Jared Duke <jdduke@google.com> 2024-02-09 18:52:53 +0000
commita561efb13ced9ac41b571a48203f078b918aaee0 (patch)
treed5545e0c2f3036ccb867aebd3786ea501e9466c6 /java/java.go
parentc99c52f9775eddb551acb8a3d5bfb44cf9c0fb85 (diff)
Use uncompressed dex for all preopted system targets
Extend default use of uncompressed dex for non-privileged system apps that are preopted. This avoids unnecessary disk usage on the /system_other/ partition, as well as the marginal overhead of extraction after mainline updates. In total, this saves ~5-15MB cumulatively across partitions. Bug: 318730708 Test: m + compare image sizes Change-Id: Id0a06965e61763f59c53cbe2b327cdcf1e5d422b
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go
index d7d271cca..0227fbc79 100644
--- a/java/java.go
+++ b/java/java.go
@@ -666,10 +666,11 @@ func shouldUncompressDex(ctx android.ModuleContext, libName string, dexpreopter
return true
}
- // Store uncompressed dex files that are preopted on /system.
- if !dexpreopter.dexpreoptDisabled(ctx, libName) && (ctx.Host() || !dexpreopter.odexOnSystemOther(ctx, libName, dexpreopter.installPath)) {
+ // Store uncompressed dex files that are preopted on /system or /system_other.
+ if !dexpreopter.dexpreoptDisabled(ctx, libName) {
return true
}
+
if ctx.Config().UncompressPrivAppDex() &&
inList(ctx.ModuleName(), ctx.Config().ModulesLoadedByPrivilegedModules()) {
return true