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 --- android/apex.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'android') diff --git a/android/apex.go b/android/apex.go index 114fe2988..79ab13caf 100644 --- a/android/apex.go +++ b/android/apex.go @@ -989,8 +989,8 @@ func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion // Function called while walking an APEX's payload dependencies. // // Return true if the `to` module should be visited, false otherwise. -type PayloadDepsCallback func(ctx ModuleContext, from blueprint.Module, to ApexModule, externalDep bool) bool -type WalkPayloadDepsFunc func(ctx ModuleContext, do PayloadDepsCallback) +type PayloadDepsCallback func(ctx BaseModuleContext, from blueprint.Module, to ApexModule, externalDep bool) bool +type WalkPayloadDepsFunc func(ctx BaseModuleContext, do PayloadDepsCallback) // ModuleWithMinSdkVersionCheck represents a module that implements min_sdk_version checks type ModuleWithMinSdkVersionCheck interface { @@ -1017,7 +1017,7 @@ func CheckMinSdkVersion(ctx ModuleContext, minSdkVersion ApiLevel, walk WalkPayl return } - walk(ctx, func(ctx ModuleContext, from blueprint.Module, to ApexModule, externalDep bool) bool { + walk(ctx, func(ctx BaseModuleContext, from blueprint.Module, to ApexModule, externalDep bool) bool { if externalDep { // external deps are outside the payload boundary, which is "stable" // interface. We don't have to check min_sdk_version for external -- cgit v1.2.3-59-g8ed1b