diff options
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index a4e91ab9c..c94ea8293 100644 --- a/java/java.go +++ b/java/java.go @@ -1717,8 +1717,10 @@ 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 - return depTag == staticLibTag + // Dependencies other than the static linkage are all considered crossing APEX boundary + // 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() } func (j *Module) Stem() string { @@ -2406,6 +2408,14 @@ func (j *Import) SrcJarArgs() ([]string, android.Paths) { return nil, nil } +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 + // 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() +} + // Add compile time check for interface implementation var _ android.IDEInfo = (*Import)(nil) var _ android.IDECustomizedModuleName = (*Import)(nil) |