Correct link type for module stubs

Module stubs compile against module_current, so any module depending on
them had to compile against module_current (or broader) too. Treat them
as the API surface the stubs are for.

Bug: 157010342
Test: m
Change-Id: I49b9082dc1b5afe6c22e94126e574dd8061f0f39
Merged-In: I49b9082dc1b5afe6c22e94126e574dd8061f0f39
(cherry picked from commit 0bd88d0b4e782df6aa99475307a4cfab6d617d14)
diff --git a/java/java.go b/java/java.go
index 1c6cd5f..0ba1f5a 100644
--- a/java/java.go
+++ b/java/java.go
@@ -852,6 +852,10 @@
 		return javaSystem, true
 	}
 
+	if stub, linkType := moduleStubLinkType(name); stub {
+		return linkType, true
+	}
+
 	ver := m.sdkVersion()
 	switch ver.kind {
 	case sdkCore: