Use prebuilts for more tools in unbundled builds

Move the logic from Make that uses prebuilts for more tools for
unbundled builds, and export the values back to make.

Test: m checkbuild
Change-Id: I8c7031e0feaa9328a2b73db6dc8e63e12d1d12f7
diff --git a/java/gen.go b/java/gen.go
index 69965ec..a073ca2 100644
--- a/java/gen.go
+++ b/java/gen.go
@@ -23,7 +23,6 @@
 )
 
 func init() {
-	pctx.HostBinToolVariable("aidlCmd", "aidl")
 	pctx.HostBinToolVariable("syspropCmd", "sysprop_java")
 	pctx.SourcePathVariable("logtagsCmd", "build/make/tools/java-event-log-tags.py")
 	pctx.SourcePathVariable("mergeLogtagsCmd", "build/make/tools/merge-event-log-tags.py")
@@ -33,8 +32,8 @@
 var (
 	aidl = pctx.AndroidStaticRule("aidl",
 		blueprint.RuleParams{
-			Command:     "$aidlCmd -d$depFile $aidlFlags $in $out",
-			CommandDeps: []string{"$aidlCmd"},
+			Command:     "${config.AidlCmd} -d$depFile $aidlFlags $in $out",
+			CommandDeps: []string{"${config.AidlCmd}"},
 		},
 		"depFile", "aidlFlags")