summaryrefslogtreecommitdiff
path: root/dexpreopt/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'dexpreopt/config.go')
-rw-r--r--dexpreopt/config.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index 9cec9dbbd..af09dbcca 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -139,6 +139,11 @@ var allSystemServerJarsKey = android.NewOnceKey("allSystemServerJars")
// Returns all jars that system_server loads.
func (g *GlobalConfig) AllSystemServerJars(ctx android.PathContext) *android.ConfiguredJarList {
+ // dexpreopt does not initialize the soong config.
+ // Initialize the OncePer here.
+ if ctx.Config().OncePer == nil {
+ ctx.Config().OncePer = &android.OncePer{}
+ }
return ctx.Config().Once(allSystemServerJarsKey, func() interface{} {
res := g.AllPlatformSystemServerJars(ctx).AppendList(g.AllApexSystemServerJars(ctx))
return &res
@@ -464,7 +469,7 @@ func (d dex2oatDependencyTag) AllowDisabledModuleDependency(target android.Modul
func (d dex2oatDependencyTag) AllowDisabledModuleDependencyProxy(
ctx android.OtherModuleProviderContext, target android.ModuleProxy) bool {
- return android.OtherModuleProviderOrDefault(
+ return android.OtherModulePointerProviderOrDefault(
ctx, target, android.CommonModuleInfoProvider).ReplacedByPrebuilt
}