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/lint.go b/java/lint.go
index 0953236..5a684a8 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -660,7 +660,7 @@
}
if apex, ok := m.(android.ApexModule); ok && apex.NotAvailableForPlatform() {
- apexInfo := ctx.ModuleProvider(m, android.ApexInfoProvider).(android.ApexInfo)
+ apexInfo, _ := android.SingletonModuleProvider(ctx, m, android.ApexInfoProvider)
if apexInfo.IsForPlatform() {
// There are stray platform variants of modules in apexes that are not available for
// the platform, and they sometimes can't be built. Don't depend on them.