From 95cef3a35a7dda90447e94b6bd1370043ee2cedb Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Tue, 25 Feb 2025 00:54:20 +0000 Subject: Convert ndkSingleton, apexDepsInfoSingleton, allTeamsSingleton, apexPrebuiltInfo to use ModuleProxy. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I77b05e8b54843bfa8b91376a6796c2b5c69be3c1 --- apex/apex_singleton.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apex/apex_singleton.go') diff --git a/apex/apex_singleton.go b/apex/apex_singleton.go index a8bd984b2..dabec4930 100644 --- a/apex/apex_singleton.go +++ b/apex/apex_singleton.go @@ -90,11 +90,11 @@ var ( func (s *apexDepsInfoSingleton) GenerateBuildActions(ctx android.SingletonContext) { updatableFlatLists := android.Paths{} - ctx.VisitAllModules(func(module android.Module) { - if binaryInfo, ok := module.(android.ApexBundleDepsInfoIntf); ok { + ctx.VisitAllModuleProxies(func(module android.ModuleProxy) { + if binaryInfo, ok := android.OtherModuleProvider(ctx, module, android.ApexBundleDepsDataProvider); ok { apexInfo, _ := android.OtherModuleProvider(ctx, module, android.ApexInfoProvider) - if path := binaryInfo.FlatListPath(); path != nil { - if binaryInfo.Updatable() || apexInfo.Updatable { + if path := binaryInfo.FlatListPath; path != nil { + if binaryInfo.Updatable || apexInfo.Updatable { if strings.HasPrefix(module.String(), "com.android.") { updatableFlatLists = append(updatableFlatLists, path) } @@ -160,11 +160,11 @@ type apexPrebuiltInfo struct { func (a *apexPrebuiltInfo) GenerateBuildActions(ctx android.SingletonContext) { prebuiltInfos := []android.PrebuiltInfo{} - ctx.VisitAllModules(func(m android.Module) { + ctx.VisitAllModuleProxies(func(m android.ModuleProxy) { prebuiltInfo, exists := android.OtherModuleProvider(ctx, m, android.PrebuiltInfoProvider) // Use prebuiltInfoProvider to filter out non apex soong modules. // Use HideFromMake to filter out the unselected variants of a specific apex. - if exists && !m.IsHideFromMake() { + if exists && !android.OtherModuleProviderOrDefault(ctx, m, android.CommonModuleInfoKey).HideFromMake { prebuiltInfos = append(prebuiltInfos, prebuiltInfo) } }) -- cgit v1.2.3-59-g8ed1b