Allow walkPayloadDeps visitor to control walk flow
Delegate the responsibility for determining whether the walkPayloadDeps() should visit a child dependency to its do function. This is needed to allow the visitor in checkApexAvailability() to avoid checking the apex_available setting after crossing the APEX boundary. Bug: 152878661 Bug: 153306490 Test: m droid Merged-In: If46a2f74b6eca670befc3aeae430650e85542346 Change-Id: If46a2f74b6eca670befc3aeae430650e85542346
This commit is contained in:
@@ -219,14 +219,18 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs,
|
||||
func (a *apexBundle) buildNoticeFiles(ctx android.ModuleContext, apexFileName string) android.NoticeOutputs {
|
||||
var noticeFiles android.Paths
|
||||
|
||||
a.walkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) {
|
||||
a.walkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool {
|
||||
if externalDep {
|
||||
return
|
||||
// As soon as the dependency graph crosses the APEX boundary, don't go further.
|
||||
return false
|
||||
}
|
||||
|
||||
notice := to.NoticeFile()
|
||||
if notice.Valid() {
|
||||
noticeFiles = append(noticeFiles, notice.Path())
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
if len(noticeFiles) == 0 {
|
||||
|
Reference in New Issue
Block a user