Merge "Remove non-constant format string in soong" into main
diff --git a/android/base_module_context.go b/android/base_module_context.go
index 8c0e4d2..839afaa 100644
--- a/android/base_module_context.go
+++ b/android/base_module_context.go
@@ -117,11 +117,6 @@
// dependencies that are not an android.Module.
GetDirectDepWithTag(name string, tag blueprint.DependencyTag) Module
- // GetDirectDep returns the Module and DependencyTag for the direct dependency with the specified
- // name, or nil if none exists. If there are multiple dependencies on the same module it returns
- // the first DependencyTag.
- GetDirectDep(name string) (blueprint.Module, blueprint.DependencyTag)
-
// VisitDirectDeps calls visit for each direct dependency. If there are multiple
// direct dependencies on the same module visit will be called multiple times on that module
// and OtherModuleDependencyTag will return a different tag for each. It raises an error if any of the
@@ -434,25 +429,6 @@
}
}
-func (b *baseModuleContext) getDirectDepFirstTag(name string) (blueprint.Module, blueprint.DependencyTag) {
- foundDeps := b.getDirectDepsInternal(name, nil)
- deps := map[blueprint.Module]bool{}
- for _, dep := range foundDeps {
- deps[dep.mod] = true
- }
- if len(deps) == 1 {
- return foundDeps[0].mod, foundDeps[0].tag
- } else if len(deps) >= 2 {
- // this could happen if two dependencies have the same name in different namespaces
- // TODO(b/186554727): this should not occur if namespaces are handled within
- // getDirectDepsInternal.
- panic(fmt.Errorf("Multiple dependencies having same BaseModuleName() %q found from %q",
- name, b.ModuleName()))
- } else {
- return nil, nil
- }
-}
-
func (b *baseModuleContext) GetDirectDepsWithTag(tag blueprint.DependencyTag) []Module {
var deps []Module
b.VisitDirectDeps(func(module Module) {
@@ -473,13 +449,6 @@
return deps
}
-// GetDirectDep returns the Module and DependencyTag for the direct dependency with the specified
-// name, or nil if none exists. If there are multiple dependencies on the same module it returns the
-// first DependencyTag.
-func (b *baseModuleContext) GetDirectDep(name string) (blueprint.Module, blueprint.DependencyTag) {
- return b.getDirectDepFirstTag(name)
-}
-
func (b *baseModuleContext) VisitDirectDeps(visit func(Module)) {
b.bp.VisitDirectDeps(func(module blueprint.Module) {
if aModule := b.validateAndroidModule(module, b.bp.OtherModuleDependencyTag(module), b.strictVisitDeps); aModule != nil {