summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-02-18 09:55:54 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-02-18 09:55:54 +0000
commit7c9662a8e992c47668f48fd1ad0f62463a007391 (patch)
treed723d66cca05ef8922da77f176a2e857d8c0e391 /java/java.go
parent954b29728db00a55c9ec366ef8c7a2fdd0329583 (diff)
parentaae9bd11c2e911807686c6bb0be0b9fa96dfcbb0 (diff)
Merge "sdk_version: "system_server_current""
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go
index ceedd8971..c3e2c9656 100644
--- a/java/java.go
+++ b/java/java.go
@@ -807,6 +807,7 @@ const (
javaSdk
javaSystem
javaModule
+ javaSystemServer
javaPlatform
)
@@ -840,6 +841,10 @@ func (m *Module) getLinkType(name string) (ret linkType, stubs bool) {
return javaModule, true
case ver.kind == sdkModule:
return javaModule, false
+ case name == "services-stubs":
+ return javaSystemServer, true
+ case ver.kind == sdkSystemServer:
+ return javaSystemServer, false
case ver.kind == sdkPrivate || ver.kind == sdkNone || ver.kind == sdkCorePlatform:
return javaPlatform, false
case !ver.valid():
@@ -875,17 +880,23 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to linkTypeContext,
}
break
case javaSystem:
- if otherLinkType == javaPlatform || otherLinkType == javaModule {
+ if otherLinkType == javaPlatform || otherLinkType == javaModule || otherLinkType == javaSystemServer {
ctx.ModuleErrorf("compiles against system API, but dependency %q is compiling against private API."+commonMessage,
ctx.OtherModuleName(to))
}
break
case javaModule:
- if otherLinkType == javaPlatform {
+ if otherLinkType == javaPlatform || otherLinkType == javaSystemServer {
ctx.ModuleErrorf("compiles against module API, but dependency %q is compiling against private API."+commonMessage,
ctx.OtherModuleName(to))
}
break
+ case javaSystemServer:
+ if otherLinkType == javaPlatform {
+ ctx.ModuleErrorf("compiles against system server API, but dependency %q is compiling against private API."+commonMessage,
+ ctx.OtherModuleName(to))
+ }
+ break
case javaPlatform:
// no restriction on link-type
break