Convert ModuleProvder to generic providers API
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the
type-safe android.SingletonModuleProvider API.
Bug: 316410648
Test: builds
Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
diff --git a/java/code_metadata_test.go b/java/code_metadata_test.go
index 8f8abd7..509e701 100644
--- a/java/code_metadata_test.go
+++ b/java/code_metadata_test.go
@@ -30,9 +30,7 @@
).Module().(*soongTesting.CodeMetadataModule)
// Check that the provider has the right contents
- data := result.ModuleProvider(
- module, soongTesting.CodeMetadataProviderKey,
- ).(soongTesting.CodeMetadataProviderData)
+ data, _ := android.SingletonModuleProvider(result, module, soongTesting.CodeMetadataProviderKey)
if !strings.HasSuffix(
data.IntermediatePath.String(), "/intermediateCodeMetadata.pb",
) {