Fix some minor issues with boot_image

Mistakenly used HostAndDeviceDefault (which builds host and device
variants by default) instead of HostAndDeviceSupported which only
builds a device variant by default.

Moved the test definitions of art and framework boot images from being
defined in all Java related tests into the test where they belong. This
is needed in order to improve the ART and framework boot image specific
testing.

Bug: 177892522
Test: m droid
Change-Id: I16771f09bd789033e18c58ae6dd4b6b9e865d831
diff --git a/apex/boot_image_test.go b/apex/boot_image_test.go
index c13ea2e..27a1562 100644
--- a/apex/boot_image_test.go
+++ b/apex/boot_image_test.go
@@ -71,6 +71,16 @@
 			],
 			srcs: ["b.java"],
 		}
+
+		boot_image {
+			name: "art-boot-image",
+			image_name: "art",
+		}
+
+		boot_image {
+			name: "framework-boot-image",
+			image_name: "boot",
+		}
 `,
 		// Configure some libraries in the art and framework boot images.
 		withArtBootImageJars("com.android.art:baz", "com.android.art:quuz"),
diff --git a/java/boot_image.go b/java/boot_image.go
index d17b5cb..0a525b7 100644
--- a/java/boot_image.go
+++ b/java/boot_image.go
@@ -48,7 +48,7 @@
 func bootImageFactory() android.Module {
 	m := &BootImageModule{}
 	m.AddProperties(&m.properties)
-	android.InitAndroidArchModule(m, android.HostAndDeviceDefault, android.MultilibCommon)
+	android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
 	android.InitApexModule(m)
 	return m
 }
diff --git a/java/testing.go b/java/testing.go
index 31ff47f..5fcf84c 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -219,16 +219,6 @@
 		dex_bootjars {
 			name: "dex_bootjars",
 		}
-
-		boot_image {
-			name: "art-boot-image",
-			image_name: "art",
-		}
-
-		boot_image {
-			name: "framework-boot-image",
-			image_name: "boot",
-		}
 `
 
 	return bp