diff options
Diffstat (limited to 'android/base_module_context.go')
-rw-r--r-- | android/base_module_context.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/android/base_module_context.go b/android/base_module_context.go index 4b90083be..cdee96f89 100644 --- a/android/base_module_context.go +++ b/android/base_module_context.go @@ -88,6 +88,11 @@ type BaseModuleContext interface { // This method shouldn't be used directly, prefer the type-safe android.OtherModuleProvider instead. otherModuleProvider(m blueprint.Module, provider blueprint.AnyProviderKey) (any, bool) + // OtherModuleHasProvider returns true if the module has the given provider set. This + // can avoid copying the provider if the caller only cares about the existence of + // the provider. + OtherModuleHasProvider(m blueprint.Module, provider blueprint.AnyProviderKey) bool + // OtherModuleIsAutoGenerated returns true if the module is auto generated by another module // instead of being defined in Android.bp file. OtherModuleIsAutoGenerated(m blueprint.Module) bool @@ -297,6 +302,10 @@ func (b *baseModuleContext) otherModuleProvider(m blueprint.Module, provider blu return b.bp.OtherModuleProvider(getWrappedModule(m), provider) } +func (b *baseModuleContext) OtherModuleHasProvider(m blueprint.Module, provider blueprint.AnyProviderKey) bool { + return b.bp.OtherModuleHasProvider(getWrappedModule(m), provider) +} + func (b *baseModuleContext) OtherModuleIsAutoGenerated(m blueprint.Module) bool { return b.bp.OtherModuleIsAutoGenerated(m) } |