Convert OtherModuleProvider to generic providers API
Convert all of the callers of OtherModuleProvider/OtherModuleHasProvider to use the type-safe android.OtherModuleProvider API. Bug: 316410648 Test: builds Change-Id: Id77f514d68761a262d9ea830a601dbed804bbbe5
This commit is contained in:
@@ -73,15 +73,11 @@ func (module *ValueSetModule) GenerateAndroidBuildActions(ctx android.ModuleCont
|
||||
// to append values to their aconfig actions.
|
||||
packages := make(map[string]android.Paths)
|
||||
ctx.VisitDirectDeps(func(dep android.Module) {
|
||||
if !ctx.OtherModuleHasProvider(dep, valuesProviderKey) {
|
||||
// Other modules get injected as dependencies too, for example the license modules
|
||||
return
|
||||
if depData, ok := android.OtherModuleProvider(ctx, dep, valuesProviderKey); ok {
|
||||
srcs := make([]android.Path, len(depData.Values))
|
||||
copy(srcs, depData.Values)
|
||||
packages[depData.Package] = srcs
|
||||
}
|
||||
depData := ctx.OtherModuleProvider(dep, valuesProviderKey).(valuesProviderData)
|
||||
|
||||
srcs := make([]android.Path, len(depData.Values))
|
||||
copy(srcs, depData.Values)
|
||||
packages[depData.Package] = srcs
|
||||
|
||||
})
|
||||
android.SetProvider(ctx, valueSetProviderKey, valueSetProviderData{
|
||||
|
Reference in New Issue
Block a user