Merge "Do not assume that boot image profile exists when building ART apex."
diff --git a/apex/apex.go b/apex/apex.go
index 09de2d4..c5b9c06 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -2508,7 +2508,8 @@
filesToAdd = append(filesToAdd, *af)
}
- if pathInApex := bootclasspathFragmentInfo.ProfileInstallPathInApex(); pathInApex != "" {
+ pathInApex := bootclasspathFragmentInfo.ProfileInstallPathInApex()
+ if pathInApex != "" && !java.SkipDexpreoptBootJars(ctx) {
pathOnHost := bootclasspathFragmentInfo.ProfilePathOnHost()
tempPath := android.PathForModuleOut(ctx, "boot_image_profile", pathInApex)