summaryrefslogtreecommitdiff
path: root/java/dexpreopt.go
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2020-01-20 18:12:23 +0000
committer Martin Stjernholm <mast@google.com> 2020-02-13 17:46:48 +0000
commit40f9f3c061e30af857a54f35a5dd670d75e1c87d (patch)
treea59f6775bffa01f08f04072f0ea3385251041b25 /java/dexpreopt.go
parent75a48d8ae23c017dadc7ac025b45f5a1aebfbe4c (diff)
Reland: Move the Once cache for dexpreopt.GlobalConfig into the
dexpreopt package. Preparation for a future CL that will need to get the make-written GlobalConfig from within dexpreopt. Also rename the Load*Config functions to Parse*Config, since they don't actually load the config files anymore. This relands https://r.android.com/1211982. Bug: 145934348 Test: m Change-Id: Icb9332a93811d77d2d8b06e983b92501b180a358
Diffstat (limited to 'java/dexpreopt.go')
-rw-r--r--java/dexpreopt.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/dexpreopt.go b/java/dexpreopt.go
index ec0b5c659..428aee2aa 100644
--- a/java/dexpreopt.go
+++ b/java/dexpreopt.go
@@ -59,7 +59,7 @@ type DexpreoptProperties struct {
}
func (d *dexpreopter) dexpreoptDisabled(ctx android.ModuleContext) bool {
- global := dexpreoptGlobalConfig(ctx)
+ global := dexpreopt.GetGlobalConfig(ctx)
if global.DisablePreopt {
return true
@@ -96,7 +96,7 @@ func (d *dexpreopter) dexpreoptDisabled(ctx android.ModuleContext) bool {
}
func odexOnSystemOther(ctx android.ModuleContext, installPath android.InstallPath) bool {
- return dexpreopt.OdexOnSystemOtherByName(ctx.ModuleName(), android.InstallPathToOnDevicePath(ctx, installPath), dexpreoptGlobalConfig(ctx))
+ return dexpreopt.OdexOnSystemOtherByName(ctx.ModuleName(), android.InstallPathToOnDevicePath(ctx, installPath), dexpreopt.GetGlobalConfig(ctx))
}
func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.ModuleOutPath) android.ModuleOutPath {
@@ -105,7 +105,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo
}
globalSoong := dexpreopt.GetGlobalSoongConfig(ctx)
- global := dexpreoptGlobalConfig(ctx)
+ global := dexpreopt.GetGlobalConfig(ctx)
bootImage := defaultBootImageConfig(ctx)
dexFiles := bootImage.dexPathsDeps.Paths()
dexLocations := bootImage.dexLocationsDeps