Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac483e08 authored by Yu Liu's avatar Yu Liu
Browse files

Use VisitDirectDepsProxy in aconfigUpdateAndroidBuildActions,

GatherPackagingSpecsWithFilter and checkClasspathFragments.

Bug: 377723687
Test: Check the ninja and mk files.
Change-Id: I620cb94a7304cf117142e5e88d8c2a16101dd9d6
parent d3228acd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ func aconfigUpdateAndroidBuildActions(ctx ModuleContext) {
	mergedAconfigFiles := make(map[string]Paths)
	mergedModeInfos := make(map[string]ModeInfo)

	ctx.VisitDirectDeps(func(module Module) {
	ctx.VisitDirectDepsProxy(func(module ModuleProxy) {
		if aconfig_dep, ok := OtherModuleProvider(ctx, module, CodegenInfoProvider); ok && len(aconfig_dep.ModeInfos) > 0 {
			maps.Copy(mergedModeInfos, aconfig_dep.ModeInfos)
		}
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ func (b *baseModuleContext) OtherModuleDir(m blueprint.Module) string {
	return b.bp.OtherModuleDir(getWrappedModule(m))
}
func (b *baseModuleContext) OtherModuleErrorf(m blueprint.Module, fmt string, args ...interface{}) {
	b.bp.OtherModuleErrorf(m, fmt, args...)
	b.bp.OtherModuleErrorf(getWrappedModule(m), fmt, args...)
}
func (b *baseModuleContext) OtherModuleDependencyTag(m blueprint.Module) blueprint.DependencyTag {
	return b.bp.OtherModuleDependencyTag(getWrappedModule(m))
+1 −1
Original line number Diff line number Diff line
@@ -474,7 +474,7 @@ func (p *PackagingBase) GatherPackagingSpecsWithFilter(ctx ModuleContext, filter
		return false
	}

	ctx.VisitDirectDeps(func(child Module) {
	ctx.VisitDirectDepsProxy(func(child ModuleProxy) {
		depTag := ctx.OtherModuleDependencyTag(child)
		if pi, ok := depTag.(PackagingItem); !ok || !pi.IsPackagingItem() {
			return
+1 −1
Original line number Diff line number Diff line
@@ -2635,7 +2635,7 @@ func (a *apexBundle) checkUpdatable(ctx android.ModuleContext) {

// checkClasspathFragments enforces that all classpath fragments in deps generate classpaths.proto config.
func (a *apexBundle) checkClasspathFragments(ctx android.ModuleContext) {
	ctx.VisitDirectDeps(func(module android.Module) {
	ctx.VisitDirectDepsProxy(func(module android.ModuleProxy) {
		if tag := ctx.OtherModuleDependencyTag(module); tag == bcpfTag || tag == sscpfTag {
			info, _ := android.OtherModuleProvider(ctx, module, java.ClasspathFragmentProtoContentInfoProvider)
			if !info.ClasspathFragmentProtoGenerated {