From 8bf14fcb89c300143dda1b8b5ce6ff8d28583109 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 25 Sep 2024 16:41:31 -0700 Subject: Allow WalkPayloadDeps to be called from mutators Replace ModuleContext with BaseModuleContext in WalkPayloadDeps and all of the callbacks used with it to allow using WalkPayloadDeps from mutators. Test: builds Flag: EXEMPT refactor Change-Id: Ie9d6cb7e9977b1d963cfbb3e43d6749307b4b1e0 --- apex/apex.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apex/apex.go') diff --git a/apex/apex.go b/apex/apex.go index df80b3a80..ff39597ea 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1814,7 +1814,7 @@ func apexFileForFilesystem(ctx android.BaseModuleContext, buildFile android.Path // visited module, the `do` callback is executed. Returning true in the callback continues the visit // to the child modules. Returning false makes the visit to continue in the sibling or the parent // modules. This is used in check* functions below. -func (a *apexBundle) WalkPayloadDeps(ctx android.ModuleContext, do android.PayloadDepsCallback) { +func (a *apexBundle) WalkPayloadDeps(ctx android.BaseModuleContext, do android.PayloadDepsCallback) { ctx.WalkDeps(func(child, parent android.Module) bool { am, ok := child.(android.ApexModule) if !ok || !am.CanHaveApexVariants() { @@ -2660,7 +2660,7 @@ func (a *apexBundle) checkStaticLinkingToStubLibraries(ctx android.ModuleContext abInfo, _ := android.ModuleProvider(ctx, android.ApexBundleInfoProvider) - a.WalkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool { + a.WalkPayloadDeps(ctx, func(ctx android.BaseModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool { if ccm, ok := to.(*cc.Module); ok { apexName := ctx.ModuleName() fromName := ctx.OtherModuleName(from) @@ -2766,7 +2766,7 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) { return } - a.WalkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool { + a.WalkPayloadDeps(ctx, func(ctx android.BaseModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool { // As soon as the dependency graph crosses the APEX boundary, don't go further. if externalDep { return false -- cgit v1.2.3-59-g8ed1b