diff options
author | 2024-12-05 13:57:10 -0800 | |
---|---|---|
committer | 2024-12-11 01:14:03 +0000 | |
commit | f7bbd2fe40e43f7fda7e08d08eeb9c2a93552ad9 (patch) | |
tree | 1adbb6819a3af76d77fb66488849ab9da485da3d /java/base.go | |
parent | e489db477b9bc260062c4b4cbfce394e63befe2d (diff) |
Split DepIsInSameApex into outgoing and incoming
Prepare for calling DepIsInSameApex from the apex transition mutator
by splitting all the implementations in two, one that is called on the
outgoing module and only takes the depTag, and one that is called on the
incoming module and only takes the depTag.
apexBundle.depVisitor was passing the child into android.IsDepInSameApex
for both the parent and child paramters. The parent field was only
used to find the type on which to call DepIsInSameApex, so this
effectively used the child's implementation of DepIsInSameApex. That
used to be necessary when the parent and child were of different
module types, as the parent module type may not have been aware
of the rules for the child module type, but is no longer necessary
with split outgoing and incoming DepIsInSameApex.
Bug: 372543712
Test: all soong tests pass
Change-Id: If7c81ec3f7b1ea69d77e9ad7694e238820194e59
Diffstat (limited to 'java/base.go')
-rw-r--r-- | java/base.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/base.go b/java/base.go index b579a5d0f..215285fdb 100644 --- a/java/base.go +++ b/java/base.go @@ -365,13 +365,13 @@ func (e *embeddableInModuleAndImport) initModuleAndImport(module android.Module) e.initSdkLibraryComponent(module) } -// Module/Import's DepIsInSameApex(...) delegates to this method. +// Module/Import's OutgoingDepIsInSameApex(...) delegates to this method. // -// This cannot implement DepIsInSameApex(...) directly as that leads to ambiguity with +// This cannot implement OutgoingDepIsInSameApex(...) directly as that leads to ambiguity with // the one provided by ApexModuleBase. -func (e *embeddableInModuleAndImport) depIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { +func (e *embeddableInModuleAndImport) depIsInSameApex(tag blueprint.DependencyTag) bool { // dependencies other than the static linkage are all considered crossing APEX boundary - if staticLibTag == ctx.OtherModuleDependencyTag(dep) { + if tag == staticLibTag { return true } return false @@ -2214,8 +2214,8 @@ func (j *Module) hasCode(ctx android.ModuleContext) bool { } // Implements android.ApexModule -func (j *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { - return j.depIsInSameApex(ctx, dep) +func (j *Module) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool { + return j.depIsInSameApex(tag) } // Implements android.ApexModule |