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
This commit is contained in:
@@ -46,7 +46,7 @@ func TestAidlLibrary(t *testing.T) {
|
||||
).RunTest(t).TestContext
|
||||
|
||||
foo := ctx.ModuleForTests("foo", "").Module().(*AidlLibrary)
|
||||
actualInfo := ctx.ModuleProvider(foo, AidlLibraryProvider).(AidlLibraryInfo)
|
||||
actualInfo, _ := android.SingletonModuleProvider(ctx, foo, AidlLibraryProvider)
|
||||
|
||||
android.AssertArrayString(
|
||||
t,
|
||||
@@ -95,7 +95,7 @@ func TestAidlLibraryWithoutStripImportPrefix(t *testing.T) {
|
||||
).RunTest(t).TestContext
|
||||
|
||||
foo := ctx.ModuleForTests("foo", "").Module().(*AidlLibrary)
|
||||
actualInfo := ctx.ModuleProvider(foo, AidlLibraryProvider).(AidlLibraryInfo)
|
||||
actualInfo, _ := android.SingletonModuleProvider(ctx, foo, AidlLibraryProvider)
|
||||
|
||||
android.AssertArrayString(
|
||||
t,
|
||||
|
Reference in New Issue
Block a user