diff options
Diffstat (limited to 'android')
-rw-r--r-- | android/aconfig_providers.go | 2 | ||||
-rw-r--r-- | android/all_teams.go | 2 | ||||
-rw-r--r-- | android/androidmk.go | 4 | ||||
-rw-r--r-- | android/apex.go | 4 | ||||
-rw-r--r-- | android/base_module_context.go | 4 | ||||
-rw-r--r-- | android/compliance_metadata.go | 2 | ||||
-rw-r--r-- | android/container.go | 4 | ||||
-rw-r--r-- | android/gen_notice.go | 2 | ||||
-rw-r--r-- | android/license_metadata.go | 2 | ||||
-rw-r--r-- | android/logtags.go | 2 | ||||
-rw-r--r-- | android/makevars.go | 2 | ||||
-rw-r--r-- | android/module.go | 8 | ||||
-rw-r--r-- | android/package.go | 2 | ||||
-rw-r--r-- | android/paths.go | 2 | ||||
-rw-r--r-- | android/prebuilt.go | 4 | ||||
-rw-r--r-- | android/testing.go | 2 |
16 files changed, 24 insertions, 24 deletions
diff --git a/android/aconfig_providers.go b/android/aconfig_providers.go index 7185a8941..9c71d927d 100644 --- a/android/aconfig_providers.go +++ b/android/aconfig_providers.go @@ -248,7 +248,7 @@ func getContainer(m Module) string { // Please only access the module's internal data through providers. func getContainerUsingProviders(ctx OtherModuleProviderContext, m Module) string { container := "system" - commonInfo, _ := OtherModuleProvider(ctx, m, CommonModuleInfoKey) + commonInfo, _ := OtherModuleProvider(ctx, m, CommonModuleInfoProvider) if commonInfo.Vendor || commonInfo.Proprietary || commonInfo.SocSpecific { container = "vendor" } else if commonInfo.ProductSpecific { diff --git a/android/all_teams.go b/android/all_teams.go index 8b55adebd..5e76e53bf 100644 --- a/android/all_teams.go +++ b/android/all_teams.go @@ -116,7 +116,7 @@ func (t *allTeamsSingleton) GenerateBuildActions(ctx SingletonContext) { testOnly: testModInfo.TestOnly, topLevelTestTarget: testModInfo.TopLevelTarget, kind: ctx.ModuleType(module), - teamName: OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoKey).Team, + teamName: OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoProvider).Team, } t.teams_for_mods[module.Name()] = entry diff --git a/android/androidmk.go b/android/androidmk.go index e4366fad2..84eef62ba 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -880,7 +880,7 @@ func getSoongOnlyDataFromMods(ctx fillInEntriesContext, mods []Module) ([]distCo } } - commonInfo, _ := OtherModuleProvider(ctx, mod, CommonModuleInfoKey) + commonInfo, _ := OtherModuleProvider(ctx, mod, CommonModuleInfoProvider) if commonInfo.SkipAndroidMkProcessing { continue } @@ -1312,7 +1312,7 @@ var AndroidMkInfoProvider = blueprint.NewProvider[*AndroidMkProviderInfo]() // Please only access the module's internal data through providers. func translateAndroidMkEntriesInfoModule(ctx SingletonContext, w io.Writer, moduleInfoJSONs *[]*ModuleInfoJSON, mod Module, providerInfo *AndroidMkProviderInfo) error { - commonInfo, _ := OtherModuleProvider(ctx, mod, CommonModuleInfoKey) + commonInfo, _ := OtherModuleProvider(ctx, mod, CommonModuleInfoProvider) if commonInfo.SkipAndroidMkProcessing { return nil } diff --git a/android/apex.go b/android/apex.go index 39de6de33..2af3f9dc7 100644 --- a/android/apex.go +++ b/android/apex.go @@ -733,7 +733,7 @@ func CheckMinSdkVersion(ctx ModuleContext, minSdkVersion ApiLevel, walk WalkPayl if !IsDepInSameApex(ctx, from, to) { return false } - if info, ok := OtherModuleProvider(ctx, to, CommonModuleInfoKey); ok && info.ModuleWithMinSdkVersionCheck { + if info, ok := OtherModuleProvider(ctx, to, CommonModuleInfoProvider); ok && info.ModuleWithMinSdkVersionCheck { if info.MinSdkVersion.ApiLevel == nil || !info.MinSdkVersion.ApiLevel.Specified() { // This dependency performs its own min_sdk_version check, just make sure it sets min_sdk_version // to trigger the check. @@ -765,7 +765,7 @@ type MinSdkVersionFromValueContext interface { // implementing this interface should provide an implementation. A module supports an sdk // version when the module's min_sdk_version is equal to or less than the given sdk version. func ShouldSupportSdkVersion(ctx BaseModuleContext, module Module, sdkVersion ApiLevel) error { - info, ok := OtherModuleProvider(ctx, module, CommonModuleInfoKey) + info, ok := OtherModuleProvider(ctx, module, CommonModuleInfoProvider) if !ok || info.MinSdkVersionSupported.IsNone() { return fmt.Errorf("min_sdk_version is not specified") } diff --git a/android/base_module_context.go b/android/base_module_context.go index d2404fd3e..eba367034 100644 --- a/android/base_module_context.go +++ b/android/base_module_context.go @@ -410,7 +410,7 @@ func (b *baseModuleContext) validateAndroidModuleProxy( return &aModule } - if !OtherModuleProviderOrDefault(b, module, CommonModuleInfoKey).Enabled { + if !OtherModuleProviderOrDefault(b, module, CommonModuleInfoProvider).Enabled { if t, ok := tag.(AllowDisabledModuleDependency); !ok || !t.AllowDisabledModuleDependencyProxy(b, aModule) { if b.Config().AllowMissingDependencies() { b.AddMissingDependencies([]string{b.OtherModuleName(aModule)}) @@ -440,7 +440,7 @@ func (b *baseModuleContext) getDirectDepsInternal(name string, tag blueprint.Dep func (b *baseModuleContext) getDirectDepsProxyInternal(name string, tag blueprint.DependencyTag) []ModuleProxy { var deps []ModuleProxy b.VisitDirectDepsProxy(func(module ModuleProxy) { - if OtherModuleProviderOrDefault(b, module, CommonModuleInfoKey).BaseModuleName == name { + if OtherModuleProviderOrDefault(b, module, CommonModuleInfoProvider).BaseModuleName == name { returnedTag := b.OtherModuleDependencyTag(module) if tag == nil || returnedTag == tag { deps = append(deps, module) diff --git a/android/compliance_metadata.go b/android/compliance_metadata.go index 9ddaee8d5..c15a206ec 100644 --- a/android/compliance_metadata.go +++ b/android/compliance_metadata.go @@ -304,7 +304,7 @@ func (c *complianceMetadataSingleton) GenerateBuildActions(ctx SingletonContext) rowId := -1 ctx.VisitAllModuleProxies(func(module ModuleProxy) { - commonInfo, _ := OtherModuleProvider(ctx, module, CommonModuleInfoKey) + commonInfo, _ := OtherModuleProvider(ctx, module, CommonModuleInfoProvider) if !commonInfo.Enabled { return } diff --git a/android/container.go b/android/container.go index a5aab79bb..5d223b86a 100644 --- a/android/container.go +++ b/android/container.go @@ -39,7 +39,7 @@ type StubsAvailableModule interface { // Returns true if the dependency module is a stubs module var depIsStubsModule exceptionHandleFunc = func(mctx ModuleContext, _ Module, dep ModuleProxy) bool { - return OtherModuleProviderOrDefault(mctx, dep, CommonModuleInfoKey).IsStubsModule + return OtherModuleProviderOrDefault(mctx, dep, CommonModuleInfoProvider).IsStubsModule } // Returns true if the dependency module belongs to any of the apexes. @@ -474,7 +474,7 @@ func checkContainerViolations(ctx ModuleContext) { if _, ok := ctx.Module().(InstallableModule); ok { containersInfo, _ := getContainerModuleInfo(ctx, ctx.Module()) ctx.VisitDirectDepsProxy(func(dep ModuleProxy) { - if !OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoKey).Enabled { + if !OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoProvider).Enabled { return } diff --git a/android/gen_notice.go b/android/gen_notice.go index 482b1e006..ae831185f 100644 --- a/android/gen_notice.go +++ b/android/gen_notice.go @@ -60,7 +60,7 @@ func (s *genNoticeBuildRules) GenerateBuildActions(ctx SingletonContext) { for _, name := range gm.For { mods := ctx.ModuleVariantsFromName(m, name) for _, mod := range mods { - if !OtherModuleProviderOrDefault(ctx, mod, CommonModuleInfoKey).Enabled { // don't depend on variants without build rules + if !OtherModuleProviderOrDefault(ctx, mod, CommonModuleInfoProvider).Enabled { // don't depend on variants without build rules continue } modules = append(modules, mod) diff --git a/android/license_metadata.go b/android/license_metadata.go index d15dfa841..e79febb8f 100644 --- a/android/license_metadata.go +++ b/android/license_metadata.go @@ -65,7 +65,7 @@ func buildLicenseMetadata(ctx *moduleContext, licenseMetadataFile WritablePath) var allDepMetadataDepSets []depset.DepSet[Path] ctx.VisitDirectDepsProxy(func(dep ModuleProxy) { - if !OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoKey).Enabled { + if !OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoProvider).Enabled { return } diff --git a/android/logtags.go b/android/logtags.go index 88d36ec72..ef7a61259 100644 --- a/android/logtags.go +++ b/android/logtags.go @@ -43,7 +43,7 @@ func MergedLogtagsPath(ctx PathContext) OutputPath { func (l *logtagsSingleton) GenerateBuildActions(ctx SingletonContext) { var allLogtags Paths ctx.VisitAllModuleProxies(func(module ModuleProxy) { - if !OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoKey).ExportedToMake { + if !OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoProvider).ExportedToMake { return } if logtagsInfo, ok := OtherModuleProvider(ctx, module, LogtagsProviderKey); ok { diff --git a/android/makevars.go b/android/makevars.go index 692b27ec6..e1d947dff 100644 --- a/android/makevars.go +++ b/android/makevars.go @@ -259,7 +259,7 @@ func (s *makeVarsSingleton) GenerateBuildActions(ctx SingletonContext) { singletonDists.lock.Unlock() ctx.VisitAllModuleProxies(func(m ModuleProxy) { - commonInfo, _ := OtherModuleProvider(ctx, m, CommonModuleInfoKey) + commonInfo, _ := OtherModuleProvider(ctx, m, CommonModuleInfoProvider) if provider, ok := OtherModuleProvider(ctx, m, ModuleMakeVarsInfoProvider); ok && commonInfo.Enabled { mctx := &makeVarsContext{ diff --git a/android/module.go b/android/module.go index a56fea322..3d643f915 100644 --- a/android/module.go +++ b/android/module.go @@ -1483,7 +1483,7 @@ func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]depset.DepSet[Inst // Installation is still handled by Make, so anything hidden from Make is not // installable. info := OtherModuleProviderOrDefault(ctx, dep, InstallFilesProvider) - commonInfo := OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoKey) + commonInfo := OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoProvider) if !commonInfo.HideFromMake && !commonInfo.SkipInstall { installDeps = append(installDeps, info.TransitiveInstallFiles) } @@ -1500,7 +1500,7 @@ func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]depset.DepSet[Inst // should also install the output files of the given dependency and dependency tag. func isInstallDepNeeded(ctx ModuleContext, dep ModuleProxy) bool { // Don't add a dependency from the platform to a library provided by an apex. - if OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoKey).UninstallableApexPlatformVariant { + if OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoProvider).UninstallableApexPlatformVariant { return false } // Only install modules if the dependency tag is an InstallDepNeeded tag. @@ -1923,7 +1923,7 @@ type ApiLevelOrPlatform struct { IsPlatform bool } -var CommonModuleInfoKey = blueprint.NewProvider[CommonModuleInfo]() +var CommonModuleInfoProvider = blueprint.NewProvider[CommonModuleInfo]() type PrebuiltModuleInfo struct { SourceExists bool @@ -2331,7 +2331,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) if mm, ok := m.module.(interface{ BaseModuleName() string }); ok { commonData.BaseModuleName = mm.BaseModuleName() } - SetProvider(ctx, CommonModuleInfoKey, commonData) + SetProvider(ctx, CommonModuleInfoProvider, commonData) if p, ok := m.module.(PrebuiltInterface); ok && p.Prebuilt() != nil { SetProvider(ctx, PrebuiltModuleInfoProvider, PrebuiltModuleInfo{ SourceExists: p.Prebuilt().SourceExists(), diff --git a/android/package.go b/android/package.go index 42f17b1d5..0f6a7678c 100644 --- a/android/package.go +++ b/android/package.go @@ -62,7 +62,7 @@ func (p *packageModule) DepsMutator(ctx BottomUpMutatorContext) { } func (p *packageModule) GenerateBuildActions(ctx blueprint.ModuleContext) { - ctx.SetProvider(CommonModuleInfoKey, CommonModuleInfo{ + ctx.SetProvider(CommonModuleInfoProvider, CommonModuleInfo{ Enabled: true, PrimaryLicensesProperty: p.primaryLicensesProperty, }) diff --git a/android/paths.go b/android/paths.go index 9c0c9a273..f7fcd35ff 100644 --- a/android/paths.go +++ b/android/paths.go @@ -683,7 +683,7 @@ func getPathsFromModuleDep(ctx ModuleWithDepsPathContext, path, moduleName, tag if module == nil { return nil, missingDependencyError{[]string{moduleName}} } - if !OtherModuleProviderOrDefault(ctx, *module, CommonModuleInfoKey).Enabled { + if !OtherModuleProviderOrDefault(ctx, *module, CommonModuleInfoProvider).Enabled { return nil, missingDependencyError{[]string{moduleName}} } diff --git a/android/prebuilt.go b/android/prebuilt.go index 4a94c0bcb..1932225b6 100644 --- a/android/prebuilt.go +++ b/android/prebuilt.go @@ -358,7 +358,7 @@ func IsModulePreferred(module Module) bool { } func IsModulePreferredProxy(ctx OtherModuleProviderContext, module ModuleProxy) bool { - if OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoKey).ReplacedByPrebuilt { + if OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoProvider).ReplacedByPrebuilt { // A source module that has been replaced by a prebuilt counterpart. return false } @@ -397,7 +397,7 @@ func GetEmbeddedPrebuilt(module Module) *Prebuilt { // the right module. This function is only safe to call after all TransitionMutators // have run, e.g. in GenerateAndroidBuildActions. func PrebuiltGetPreferred(ctx BaseModuleContext, module Module) Module { - if !OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoKey).ReplacedByPrebuilt { + if !OtherModuleProviderOrDefault(ctx, module, CommonModuleInfoProvider).ReplacedByPrebuilt { return module } if _, ok := OtherModuleProvider(ctx, module, PrebuiltModuleInfoProvider); ok { diff --git a/android/testing.go b/android/testing.go index 1962fdea5..08c8083a6 100644 --- a/android/testing.go +++ b/android/testing.go @@ -1197,7 +1197,7 @@ func AndroidMkInfoForTest(t *testing.T, ctx *TestContext, mod Module) *AndroidMk info := OtherModuleProviderOrDefault(ctx, mod, AndroidMkInfoProvider) aconfigUpdateAndroidMkInfos(ctx, mod, info) - commonInfo, _ := OtherModuleProvider(ctx, mod, CommonModuleInfoKey) + commonInfo, _ := OtherModuleProvider(ctx, mod, CommonModuleInfoProvider) info.PrimaryInfo.fillInEntries(ctx, mod, &commonInfo) if len(info.ExtraInfo) > 0 { for _, ei := range info.ExtraInfo { |