Disallow missing api source files for java_api_library module

The purpose of this change is to enable filegroups to be taken as inputs
for `java_api_library` module `api_files` property. However, since
android.MaybeExistentPathForSource() does not support this, it needs to
be replaced with android.PathForModuleSrc(), which checks for the files'
existence.

Bug: 283006953
Test: go test ./java
Change-Id: I8a7d7f200f900219cc17243194a4c26071329ee6
diff --git a/java/testing.go b/java/testing.go
index 6671bf0..ffc3a08 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -71,7 +71,12 @@
 		// Needed for framework
 		defaultJavaDir + "/framework/aidl": nil,
 		// Needed for various deps defined in GatherRequiredDepsForTest()
-		defaultJavaDir + "/a.java": nil,
+		defaultJavaDir + "/a.java":                        nil,
+		defaultJavaDir + "/api/current.txt":               nil,
+		defaultJavaDir + "/api/system-current.txt":        nil,
+		defaultJavaDir + "/api/test-current.txt":          nil,
+		defaultJavaDir + "/api/module-lib-current.txt":    nil,
+		defaultJavaDir + "/api/system-server-current.txt": nil,
 
 		// Needed for R8 rules on apps
 		"build/make/core/proguard.flags":             nil,