Replace android.BuildOs with Config.BuildOS

Replace the android.BuildOs constant with Config.BuildOS so that it
can vary based on the product config.

Bug: 190084016
Test: all Soong tests
Change-Id: Ia67f872d8b2ab788747a22e3a9659dc21c9775cd
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go
index b13955f..1507aaf 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -32,7 +32,7 @@
 		}
 	}
 	// We may also need the images on host in order to run host-based tests.
-	for _, target := range ctx.Config().Targets[android.BuildOs] {
+	for _, target := range ctx.Config().Targets[ctx.Config().BuildOS] {
 		targets = append(targets, target)
 	}