Merge "Remove usage of OtherModuleHasProvider in dexpreopt_bootjars" into main
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 205d3b9..73609bf 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -552,8 +552,8 @@
func addDependenciesOntoSelectedBootImageApexes(ctx android.BottomUpMutatorContext, apexes ...string) {
psi := android.PrebuiltSelectionInfoMap{}
ctx.VisitDirectDepsWithTag(apexContributionsMetadataDepTag, func(am android.Module) {
- if ctx.OtherModuleHasProvider(am, android.PrebuiltSelectionInfoProvider) {
- psi = ctx.OtherModuleProvider(am, android.PrebuiltSelectionInfoProvider).(android.PrebuiltSelectionInfoMap)
+ if info, exists := android.OtherModuleProvider(ctx, am, android.PrebuiltSelectionInfoProvider); exists {
+ psi = info
}
})
for _, apex := range apexes {