diff options
Diffstat (limited to 'java/dexpreopt.go')
-rw-r--r-- | java/dexpreopt.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 1192d929e..479dec60b 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -101,6 +101,10 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo global := dexpreoptGlobalConfig(ctx) bootImage := defaultBootImageConfig(ctx) + defaultBootImage := bootImage + if global.UseApexImage { + bootImage = apexBootImageConfig(ctx) + } var archs []android.ArchType for _, a := range ctx.MultiTargets() { @@ -170,8 +174,11 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Mo DexPreoptImagesDeps: imagesDeps, DexPreoptImageLocations: bootImage.imageLocations, - PreoptBootClassPathDexFiles: bootImage.dexPathsDeps.Paths(), - PreoptBootClassPathDexLocations: bootImage.dexLocationsDeps, + // We use the dex paths and dex locations of the default boot image, as it + // contains the full dexpreopt boot classpath. Other images may just contain a subset of + // the dexpreopt boot classpath. + PreoptBootClassPathDexFiles: defaultBootImage.dexPathsDeps.Paths(), + PreoptBootClassPathDexLocations: defaultBootImage.dexLocationsDeps, PreoptExtractedApk: false, |