Remove usage of OtherModuleHasProvider in dexpreopt_bootjars

Since OtherModuleHasProvider will be deprecated soon, replace it with OtherModuleProvider

Test: go build ./java
Change-Id: I79736e44d85bc6e8c97f08ebf783b40533a3e6ae
This commit is contained in:
Spandan Das 2023-12-20 01:27:29 +00:00
parent a4cca85eea
commit bc114d2ff9

View file

@ -552,8 +552,8 @@ func DexpreoptBootJarsMutator(ctx android.BottomUpMutatorContext) {
func addDependenciesOntoSelectedBootImageApexes(ctx android.BottomUpMutatorContext, apexes ...string) { func addDependenciesOntoSelectedBootImageApexes(ctx android.BottomUpMutatorContext, apexes ...string) {
psi := android.PrebuiltSelectionInfoMap{} psi := android.PrebuiltSelectionInfoMap{}
ctx.VisitDirectDepsWithTag(apexContributionsMetadataDepTag, func(am android.Module) { ctx.VisitDirectDepsWithTag(apexContributionsMetadataDepTag, func(am android.Module) {
if ctx.OtherModuleHasProvider(am, android.PrebuiltSelectionInfoProvider) { if info, exists := android.OtherModuleProvider(ctx, am, android.PrebuiltSelectionInfoProvider); exists {
psi = ctx.OtherModuleProvider(am, android.PrebuiltSelectionInfoProvider).(android.PrebuiltSelectionInfoMap) psi = info
} }
}) })
for _, apex := range apexes { for _, apex := range apexes {