summaryrefslogtreecommitdiff
path: root/android/provider.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2024-08-15 18:46:17 +0000
committer Yu Liu <yudiliu@google.com> 2024-08-16 00:20:27 +0000
commitd46e5ae6703ddd54bed30a4da430d4454acf7006 (patch)
treead37a20075a62d2c3495475fca33a6488b5f0855 /android/provider.go
parent47a91c9f4f9f99952c96ca36aa6e7b52b3a898c9 (diff)
Remove more internal fields from ModuleBase.
Bug: 358425833 Test: Manual compare the generated ninja and mk files and CI. Change-Id: I4edd0dc646ac035594f47cd9044cc4eb5f710e64
Diffstat (limited to 'android/provider.go')
-rw-r--r--android/provider.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/android/provider.go b/android/provider.go
index 327f224f7..5ded4cc14 100644
--- a/android/provider.go
+++ b/android/provider.go
@@ -32,6 +32,11 @@ func OtherModuleProvider[K any](ctx OtherModuleProviderContext, module blueprint
return value.(K), ok
}
+func OtherModuleProviderOrDefault[K any](ctx OtherModuleProviderContext, module blueprint.Module, provider blueprint.ProviderKey[K]) K {
+ value, _ := OtherModuleProvider(ctx, module, provider)
+ return value
+}
+
// ModuleProviderContext is a helper interface that is a subset of ModuleContext, BottomUpMutatorContext, or
// TopDownMutatorContext for use in ModuleProvider.
type ModuleProviderContext interface {