Merge "Remove UseApexImage and GenerateApexImage."
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index 720f79e..e353878 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -32,9 +32,6 @@
 
 	UseArtImage bool // use the art image (use other boot class path dex files without image)
 
-	GenerateApexImage bool // generate an extra boot image only containing jars from the runtime apex
-	UseApexImage      bool // use the apex image by default
-
 	HasSystemOther        bool     // store odex files that match PatternsOnSystemOther on the system_other partition
 	PatternsOnSystemOther []string // patterns (using '%' to denote a prefix match) to put odex on the system_other partition
 
diff --git a/java/dexpreopt.go b/java/dexpreopt.go
index 5faec08..c81e199 100644
--- a/java/dexpreopt.go
+++ b/java/dexpreopt.go
@@ -111,14 +111,6 @@
 	if global.UseArtImage {
 		bootImage = artBootImageConfig(ctx)
 	}
-	if global.UseApexImage {
-		bootImage = frameworkJZBootImageConfig(ctx)
-		dexFiles = bootImage.dexPathsDeps.Paths()
-		dexLocations = bootImage.dexLocationsDeps
-		if global.UseArtImage {
-			bootImage = artJZBootImageConfig(ctx)
-		}
-	}
 
 	var archs []android.ArchType
 	for _, a := range ctx.MultiTargets() {
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 87f6d5e..607a437 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -197,13 +197,6 @@
 	// 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
 }
 
@@ -232,11 +225,6 @@
 	d.defaultBootImage = buildBootImage(ctx, defaultBootImageConfig(ctx))
 	// Create boot image for the ART apex (build artifacts are accessed via the global boot image config).
 	d.otherImages = append(d.otherImages, buildBootImage(ctx, artBootImageConfig(ctx)))
-	if global.GenerateApexImage {
-		// Create boot images for the JIT-zygote experiment.
-		d.otherImages = append(d.otherImages, buildBootImage(ctx, artJZBootImageConfig(ctx)))
-		d.otherImages = append(d.otherImages, buildBootImage(ctx, frameworkJZBootImageConfig(ctx)))
-	}
 
 	dumpOatRules(ctx, d.defaultBootImage)
 }
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go
index 637a32f..4c9add8 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -125,8 +125,6 @@
 	bootImageConfigKey       = android.NewOnceKey("bootImageConfig")
 	artBootImageName         = "art"
 	frameworkBootImageName   = "boot"
-	artJZBootImageName       = "jitzygote-art"
-	frameworkJZBootImageName = "jitzygote-boot"
 )
 
 // Construct the global boot image configs.
@@ -180,33 +178,9 @@
 			dexLocationsDeps: append(artLocations, frameworkLocations...),
 		}
 
-		// ART config for JIT-zygote boot image.
-		artJZCfg := bootImageConfig{
-			extension:        false,
-			name:             artJZBootImageName,
-			stem:             "apex",
-			installSubdir:    artSubdir,
-			modules:          artModules,
-			dexLocations:     artLocations,
-			dexLocationsDeps: artLocations,
-		}
-
-		// Framework config for JIT-zygote boot image extension.
-		frameworkJZCfg := bootImageConfig{
-			extension:        true,
-			name:             frameworkJZBootImageName,
-			stem:             "apex",
-			installSubdir:    frameworkSubdir,
-			modules:          frameworkModules,
-			dexLocations:     frameworkLocations,
-			dexLocationsDeps: append(artLocations, frameworkLocations...),
-		}
-
 		configs := map[string]*bootImageConfig{
 			artBootImageName:         &artCfg,
 			frameworkBootImageName:   &frameworkCfg,
-			artJZBootImageName:       &artJZCfg,
-			frameworkJZBootImageName: &frameworkJZCfg,
 		}
 
 		// common to all configs
@@ -249,11 +223,6 @@
 		frameworkCfg.primaryImages = artCfg.images
 		frameworkCfg.imageLocations = append(artCfg.imageLocations, frameworkCfg.imageLocations...)
 
-		// specific to the jitzygote-framework config
-		frameworkJZCfg.dexPathsDeps = append(artJZCfg.dexPathsDeps, frameworkJZCfg.dexPathsDeps...)
-		frameworkJZCfg.primaryImages = artJZCfg.images
-		frameworkJZCfg.imageLocations = append(artJZCfg.imageLocations, frameworkJZCfg.imageLocations...)
-
 		return configs
 	}).(map[string]*bootImageConfig)
 }
@@ -266,14 +235,6 @@
 	return *genBootImageConfigs(ctx)[frameworkBootImageName]
 }
 
-func artJZBootImageConfig(ctx android.PathContext) bootImageConfig {
-	return *genBootImageConfigs(ctx)[artJZBootImageName]
-}
-
-func frameworkJZBootImageConfig(ctx android.PathContext) bootImageConfig {
-	return *genBootImageConfigs(ctx)[frameworkJZBootImageName]
-}
-
 func defaultBootclasspath(ctx android.PathContext) []string {
 	return ctx.Config().OnceStringSlice(defaultBootclasspathKey, func() []string {
 		global := dexpreoptGlobalConfig(ctx)