Convert SetProvider to generic providers API
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.
Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go
index 4eb916d..f0b468e 100644
--- a/java/bootclasspath_fragment.go
+++ b/java/bootclasspath_fragment.go
@@ -500,7 +500,7 @@
if ctx.Module() != ctx.FinalModule() {
b.HideFromMake()
}
- ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{})
+ android.SetProvider(ctx, testing.TestModuleProviderKey, testing.TestModuleProviderData{})
}
// getProfileProviderApex returns the name of the apex that provides a boot image profile, or an
@@ -537,7 +537,7 @@
}
// Make the apex content info available for other modules.
- ctx.SetProvider(BootclasspathFragmentApexContentInfoProvider, info)
+ android.SetProvider(ctx, BootclasspathFragmentApexContentInfoProvider, info)
}
// generateClasspathProtoBuildActions generates all required build actions for classpath.proto config
@@ -623,7 +623,7 @@
hiddenAPIInfo.HiddenAPIFlagOutput = output.HiddenAPIFlagOutput
// Provide it for use by other modules.
- ctx.SetProvider(HiddenAPIInfoProvider, hiddenAPIInfo)
+ android.SetProvider(ctx, HiddenAPIInfoProvider, hiddenAPIInfo)
return output
}
@@ -744,7 +744,7 @@
}
// Make the information available for the sdk snapshot.
- ctx.SetProvider(HiddenAPIInfoForSdkProvider, HiddenAPIInfoForSdk{
+ android.SetProvider(ctx, HiddenAPIInfoForSdkProvider, HiddenAPIInfoForSdk{
FlagFilesByCategory: flagFilesByCategory,
HiddenAPIFlagOutput: flagOutput,
})