Merge "Rename UpdatableSystemServerJars to ApexSystemServerJars."

This commit is contained in:
satayev 2021-07-29 11:23:43 +00:00 committed by Gerrit Code Review
commit 0d8c497535
3 changed files with 13 additions and 13 deletions

View file

@ -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: "",

View file

@ -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 {

View file

@ -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 {