Merge "Fix apex_available" into rvc-dev
This commit is contained in:
18
java/java.go
18
java/java.go
@@ -1790,11 +1790,16 @@ func (j *Module) hasCode(ctx android.ModuleContext) bool {
|
||||
}
|
||||
|
||||
func (j *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
|
||||
depTag := ctx.OtherModuleDependencyTag(dep)
|
||||
// Dependencies other than the static linkage are all considered crossing APEX boundary
|
||||
if staticLibTag == ctx.OtherModuleDependencyTag(dep) {
|
||||
return true
|
||||
}
|
||||
// Also, a dependency to an sdk member is also considered as such. This is required because
|
||||
// sdk members should be mutated into APEXes. Refer to sdk.sdkDepsReplaceMutator.
|
||||
return depTag == staticLibTag || j.IsInAnySdk()
|
||||
if sa, ok := dep.(android.SdkAware); ok && sa.IsInAnySdk() {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (j *Module) Stem() string {
|
||||
@@ -2495,11 +2500,16 @@ func (j *Import) SrcJarArgs() ([]string, android.Paths) {
|
||||
}
|
||||
|
||||
func (j *Import) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
|
||||
depTag := ctx.OtherModuleDependencyTag(dep)
|
||||
// dependencies other than the static linkage are all considered crossing APEX boundary
|
||||
if staticLibTag == ctx.OtherModuleDependencyTag(dep) {
|
||||
return true
|
||||
}
|
||||
// Also, a dependency to an sdk member is also considered as such. This is required because
|
||||
// sdk members should be mutated into APEXes. Refer to sdk.sdkDepsReplaceMutator.
|
||||
return depTag == staticLibTag || j.IsInAnySdk()
|
||||
if sa, ok := dep.(android.SdkAware); ok && sa.IsInAnySdk() {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Add compile time check for interface implementation
|
||||
|
@@ -581,6 +581,14 @@ func (module *SdkLibrary) createStubsSources(mctx android.LoadHookContext, apiSc
|
||||
mctx.CreateModule(DroidstubsFactory, &props)
|
||||
}
|
||||
|
||||
func (module *SdkLibrary) DepIsInSameApex(mctx android.BaseModuleContext, dep android.Module) bool {
|
||||
depTag := mctx.OtherModuleDependencyTag(dep)
|
||||
if depTag == xmlPermissionsFileTag {
|
||||
return true
|
||||
}
|
||||
return module.Library.DepIsInSameApex(mctx, dep)
|
||||
}
|
||||
|
||||
// Creates the xml file that publicizes the runtime library
|
||||
func (module *SdkLibrary) createXmlFile(mctx android.LoadHookContext) {
|
||||
props := struct {
|
||||
@@ -590,9 +598,11 @@ func (module *SdkLibrary) createXmlFile(mctx android.LoadHookContext) {
|
||||
Device_specific *bool
|
||||
Product_specific *bool
|
||||
System_ext_specific *bool
|
||||
Apex_available []string
|
||||
}{
|
||||
Name: proptools.StringPtr(module.xmlFileName()),
|
||||
Lib_name: proptools.StringPtr(module.BaseModuleName()),
|
||||
Name: proptools.StringPtr(module.xmlFileName()),
|
||||
Lib_name: proptools.StringPtr(module.BaseModuleName()),
|
||||
Apex_available: module.ApexProperties.Apex_available,
|
||||
}
|
||||
|
||||
if module.SocSpecific() {
|
||||
|
Reference in New Issue
Block a user