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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user