Track transitive packaged license deps of containers
Containers generally package the transitive installable
dependencies of their direct dependencies, track them as license
deps.
Bug: 207445310
Test: m checkbuild
Change-Id: Ic8640152cee0e0cfec5e85a1649a8adfd29d517a
diff --git a/android/paths.go b/android/paths.go
index 70e427b..4c69de7 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -2149,3 +2149,23 @@
}
return false
}
+
+// PathsDepSet is a thin type-safe wrapper around the generic depSet. It always uses
+// topological order.
+type PathsDepSet struct {
+ depSet
+}
+
+// newPathsDepSet returns an immutable PathsDepSet with the given direct and
+// transitive contents.
+func newPathsDepSet(direct Paths, transitive []*PathsDepSet) *PathsDepSet {
+ return &PathsDepSet{*newDepSet(TOPOLOGICAL, direct, transitive)}
+}
+
+// ToList returns the PathsDepSet flattened to a list in topological order.
+func (d *PathsDepSet) ToList() Paths {
+ if d == nil {
+ return nil
+ }
+ return d.depSet.ToList().(Paths)
+}