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:
@@ -91,7 +91,7 @@ var TestModuleProviderKey = blueprint.NewProvider[TestModuleProviderData]()
|
||||
|
||||
func (module *TestSpecModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
for _, m := range ctx.GetDirectDepsWithTag(testsDepTag) {
|
||||
if !ctx.OtherModuleHasProvider(m, TestModuleProviderKey) {
|
||||
if _, ok := android.OtherModuleProvider(ctx, m, TestModuleProviderKey); !ok {
|
||||
ctx.ModuleErrorf(ErrTestModuleDataNotFound, m.Name())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user