summaryrefslogtreecommitdiff
path: root/java/sdk_library_external.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2021-02-26 16:20:32 -0800
committer Colin Cross <ccross@android.com> 2021-02-26 16:28:12 -0800
commit75ce9eccf3651991ccd2897bba03b8a9bba9b733 (patch)
treef203d0f649e0ec582982950481c1945bc1e2901f /java/sdk_library_external.go
parentb014f0787edaa598e4d7186fc174c28b0091ed3a (diff)
Remove global state from sysprop libraries
Sysprop libraries use a global list to rewrite dependencies from implementation libraries to public stub libraries when appropriate. Remove the global list, and instead add a dependency from the implementation to the public stub that forwards the JavaInfo. Bug: 181367697 Test: sysprop_test.go Change-Id: Ia7995feb3c079ca9bb6a403daaae3e3329fd7f6a
Diffstat (limited to 'java/sdk_library_external.go')
-rw-r--r--java/sdk_library_external.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/sdk_library_external.go b/java/sdk_library_external.go
index 293493685..0acaa13b2 100644
--- a/java/sdk_library_external.go
+++ b/java/sdk_library_external.go
@@ -75,10 +75,15 @@ func (j *Module) allowListedInterPartitionJavaLibrary(ctx android.EarlyModuleCon
return inList(j.Name(), ctx.Config().InterPartitionJavaLibraryAllowList())
}
+func (j *Module) syspropWithPublicStubs() bool {
+ return j.deviceProperties.SyspropPublicStub != ""
+}
+
type javaSdkLibraryEnforceContext interface {
Name() string
allowListedInterPartitionJavaLibrary(ctx android.EarlyModuleContext) bool
partitionGroup(ctx android.EarlyModuleContext) partitionGroup
+ syspropWithPublicStubs() bool
}
var _ javaSdkLibraryEnforceContext = (*Module)(nil)
@@ -88,6 +93,10 @@ func (j *Module) checkPartitionsForJavaDependency(ctx android.EarlyModuleContext
return
}
+ if dep.syspropWithPublicStubs() {
+ return
+ }
+
// If product interface is not enforced, skip check between system and product partition.
// But still need to check between product and vendor partition because product interface flag
// just represents enforcement between product and system, and vendor interface enforcement