summaryrefslogtreecommitdiff
path: root/java/sdk_library.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-12-11 08:49:33 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-12-11 08:49:33 -0800
commitc9237f7bb9887dee0d7412559df49d1ce7dddff0 (patch)
tree2f048756f7824934dd60b0aaa9b5edea7882fd2b /java/sdk_library.go
parent1f1e901cb1b9b4bbdcecb97a2c31cd620f0311f9 (diff)
parentf7bbd2fe40e43f7fda7e08d08eeb9c2a93552ad9 (diff)
Split DepIsInSameApex into outgoing and incoming am: f7bbd2fe40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3393290 Change-Id: Ia514f6b2e0bdc19f55a702d5942e8f7c909b44a4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/sdk_library.go')
-rw-r--r--java/sdk_library.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go
index 78917768b..991f84767 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1282,7 +1282,7 @@ func (module *SdkLibrary) CheckMinSdkVersion(ctx android.ModuleContext) {
func CheckMinSdkVersion(ctx android.ModuleContext, module *Library) {
android.CheckMinSdkVersion(ctx, module.MinSdkVersion(ctx), func(c android.BaseModuleContext, do android.PayloadDepsCallback) {
ctx.WalkDeps(func(child android.Module, parent android.Module) bool {
- isExternal := !module.depIsInSameApex(ctx, child)
+ isExternal := !android.IsDepInSameApex(ctx, module, child)
if am, ok := child.(android.ApexModule); ok {
if !do(ctx, parent, am, isExternal) {
return false
@@ -1636,15 +1636,14 @@ func (module *SdkLibrary) compareAgainstLatestApi(apiScope *apiScope) bool {
}
// Implements android.ApexModule
-func (module *SdkLibrary) DepIsInSameApex(mctx android.BaseModuleContext, dep android.Module) bool {
- depTag := mctx.OtherModuleDependencyTag(dep)
+func (module *SdkLibrary) OutgoingDepIsInSameApex(depTag blueprint.DependencyTag) bool {
if depTag == xmlPermissionsFileTag {
return true
}
- if dep.Name() == module.implLibraryModuleName() {
+ if depTag == implLibraryTag {
return true
}
- return module.Library.DepIsInSameApex(mctx, dep)
+ return module.Library.OutgoingDepIsInSameApex(depTag)
}
// Implements android.ApexModule
@@ -2059,8 +2058,7 @@ func (module *SdkLibraryImport) DepsMutator(ctx android.BottomUpMutatorContext)
var _ android.ApexModule = (*SdkLibraryImport)(nil)
// Implements android.ApexModule
-func (module *SdkLibraryImport) DepIsInSameApex(mctx android.BaseModuleContext, dep android.Module) bool {
- depTag := mctx.OtherModuleDependencyTag(dep)
+func (module *SdkLibraryImport) OutgoingDepIsInSameApex(depTag blueprint.DependencyTag) bool {
if depTag == xmlPermissionsFileTag {
return true
}