diff options
Diffstat (limited to 'java/dexpreopt_bootjars.go')
-rw-r--r-- | java/dexpreopt_bootjars.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index a81ab8316..a2e473469 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -558,6 +558,10 @@ func addDependenciesOntoSelectedBootImageApexes(ctx android.BottomUpMutatorConte apexVariationOfSelected := append(ctx.Target().Variations(), blueprint.Variation{Mutator: "apex", Variation: apex}) if ctx.OtherModuleDependencyVariantExists(apexVariationOfSelected, selected) { ctx.AddFarVariationDependencies(apexVariationOfSelected, dexpreoptBootJarDepTag, selected) + } else if ctx.OtherModuleDependencyVariantExists(apexVariationOfSelected, android.RemoveOptionalPrebuiltPrefix(selected)) { + // The prebuilt might have been renamed by prebuilt_rename mutator if the source module does not exist. + // Remove the prebuilt_ prefix. + ctx.AddFarVariationDependencies(apexVariationOfSelected, dexpreoptBootJarDepTag, android.RemoveOptionalPrebuiltPrefix(selected)) } } } |