Write AndroidMk for api-versions.xml module

Soong does not write AndroidMk output if the default outputfile is
invalid. The default output file for droidstubs modules is the srcjar,
but not all droidstubs modules have srcjars. Make it also write
AndroidMk entries for droidstubs that only have an api-versions.xml
output.

A similar exception already existed for the api txt files, so use the
same mechanism.

Bug: 187398174
Test: m nothing && grep Android-${TARGET_PRODUCT}.mk
Change-Id: I5cbcf42d877ca166d172b727c0aa2bdf6d9af744
diff --git a/java/androidmk.go b/java/androidmk.go
index f6ea6a9..439b1d1 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -542,6 +542,9 @@
 	if !outputFile.Valid() {
 		outputFile = android.OptionalPathForPath(dstubs.apiFile)
 	}
+	if !outputFile.Valid() {
+		outputFile = android.OptionalPathForPath(dstubs.apiVersionsXml)
+	}
 	return []android.AndroidMkEntries{android.AndroidMkEntries{
 		Class:      "JAVA_LIBRARIES",
 		OutputFile: outputFile,