diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 66840b503..c6aa7fe0d 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -190,7 +190,18 @@ func DexpreoptedArtApexJars(ctx android.BuilderContext) map[android.ArchType]and if skipDexpreoptBootJars(ctx) { return nil } - return artBootImageConfig(ctx).imagesDeps + + // Include dexpreopt files for the primary boot image. + files := artBootImageConfig(ctx).imagesDeps + + // For JIT-zygote config, also include dexpreopt files for the primary JIT-zygote image. + if dexpreoptGlobalConfig(ctx).UseApexImage { + for arch, paths := range artJZBootImageConfig(ctx).imagesDeps { + files[arch] = append(files[arch], paths...) + } + } + + return files } // dexpreoptBoot singleton rules