diff --git a/dexpreopt/config.go b/dexpreopt/config.go index d4ab4bc3b..7a74506b7 100644 --- a/dexpreopt/config.go +++ b/dexpreopt/config.go @@ -49,10 +49,10 @@ type GlobalConfig struct { ArtApexJars android.ConfiguredJarList // modules for jars that are in the ART APEX - SystemServerJars android.ConfiguredJarList // jars that form the system server - SystemServerApps []string // apps that are loaded into system server - UpdatableSystemServerJars android.ConfiguredJarList // jars within apex that are loaded into system server - SpeedApps []string // apps that should be speed optimized + SystemServerJars android.ConfiguredJarList // jars that form the system server + SystemServerApps []string // apps that are loaded into system server + ApexSystemServerJars android.ConfiguredJarList // jars within apex that are loaded into system server + SpeedApps []string // apps that should be speed optimized BrokenSuboptimalOrderOfSystemServerJars bool // if true, sub-optimal order does not cause a build error @@ -618,7 +618,7 @@ func GlobalConfigForTests(ctx android.PathContext) *GlobalConfig { ArtApexJars: android.EmptyConfiguredJarList(), SystemServerJars: android.EmptyConfiguredJarList(), SystemServerApps: nil, - UpdatableSystemServerJars: android.EmptyConfiguredJarList(), + ApexSystemServerJars: android.EmptyConfiguredJarList(), SpeedApps: nil, PreoptFlags: nil, DefaultCompilerFilter: "", diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go index da015a389..4c6ae82e9 100644 --- a/dexpreopt/dexpreopt.go +++ b/dexpreopt/dexpreopt.go @@ -111,7 +111,7 @@ func dexpreoptDisabled(ctx android.PathContext, global *GlobalConfig, module *Mo } // Don't preopt system server jars that are updatable. - if global.UpdatableSystemServerJars.ContainsJar(module.Name) { + if global.ApexSystemServerJars.ContainsJar(module.Name) { return true } @@ -234,7 +234,7 @@ func dexpreoptCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig, g invocationPath := odexPath.ReplaceExtension(ctx, "invocation") - systemServerJars := NonUpdatableSystemServerJars(ctx, global) + systemServerJars := NonApexSystemServerJars(ctx, global) rule.Command().FlagWithArg("mkdir -p ", filepath.Dir(odexPath.String())) rule.Command().FlagWithOutput("rm -f ", odexPath) @@ -523,13 +523,13 @@ func makefileMatch(pattern, s string) bool { } } -var nonUpdatableSystemServerJarsKey = android.NewOnceKey("nonUpdatableSystemServerJars") +var nonApexSystemServerJarsKey = android.NewOnceKey("nonApexSystemServerJars") // TODO: eliminate the superficial global config parameter by moving global config definition // from java subpackage to dexpreopt. -func NonUpdatableSystemServerJars(ctx android.PathContext, global *GlobalConfig) []string { - return ctx.Config().Once(nonUpdatableSystemServerJarsKey, func() interface{} { - return android.RemoveListFromList(global.SystemServerJars.CopyOfJars(), global.UpdatableSystemServerJars.CopyOfJars()) +func NonApexSystemServerJars(ctx android.PathContext, global *GlobalConfig) []string { + return ctx.Config().Once(nonApexSystemServerJarsKey, func() interface{} { + return android.RemoveListFromList(global.SystemServerJars.CopyOfJars(), global.ApexSystemServerJars.CopyOfJars()) }).([]string) } @@ -556,7 +556,7 @@ func checkSystemServerOrder(ctx android.PathContext, jarIndex int) { mctx, isModule := ctx.(android.ModuleContext) if isModule { config := GetGlobalConfig(ctx) - jars := NonUpdatableSystemServerJars(ctx, config) + jars := NonApexSystemServerJars(ctx, config) mctx.WalkDeps(func(dep android.Module, parent android.Module) bool { depIndex := android.IndexList(dep.Name(), jars) if jarIndex < depIndex && !config.BrokenSuboptimalOrderOfSystemServerJars { diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go index dfe90bacc..6c2a5b58b 100644 --- a/java/systemserver_classpath_fragment.go +++ b/java/systemserver_classpath_fragment.go @@ -107,7 +107,7 @@ func (s *SystemServerClasspathModule) configuredJars(ctx android.ModuleContext) global := dexpreopt.GetGlobalConfig(ctx) possibleUpdatableModules := gatherPossibleApexModuleNamesAndStems(ctx, s.properties.Contents, systemServerClasspathFragmentContentDepTag) - return global.UpdatableSystemServerJars.Filter(possibleUpdatableModules) + return global.ApexSystemServerJars.Filter(possibleUpdatableModules) } type systemServerClasspathFragmentContentDependencyTag struct {