Revert "Remove non-generic provider APIs"

This reverts commit ad50aca6ab.

Reason for revert: Broke builds when combined with aosp/2876755

Change-Id: I3bfbcb05d8c695b9315b7e8e3f63c6bd5c9dbe36
This commit is contained in:
Colin Cross
2023-12-20 00:59:28 +00:00
committed by Gerrit Code Review
parent ad50aca6ab
commit 84b68c90ae
3 changed files with 50 additions and 15 deletions

View File

@@ -203,6 +203,16 @@ func (ctx *TestContext) HardCodedPreArchMutators(f RegisterMutatorFunc) {
ctx.PreArchMutators(f)
}
func (ctx *TestContext) ModuleProvider(m blueprint.Module, p blueprint.AnyProviderKey) any {
value, _ := ctx.Context.ModuleProvider(m, p)
return value
}
func (ctx *TestContext) ModuleHasProvider(m blueprint.Module, p blueprint.AnyProviderKey) bool {
_, ok := ctx.Context.ModuleProvider(m, p)
return ok
}
func (ctx *TestContext) moduleProvider(m blueprint.Module, p blueprint.AnyProviderKey) (any, bool) {
return ctx.Context.ModuleProvider(m, p)
}