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

Commit 02f8cb49 authored by Paul Duffin's avatar Paul Duffin Committed by Automerger Merge Worker
Browse files

Merge "Remove unnecessary dedup logic" am: 71937107 am: 916f3b6b am: b16974e7 am: 8803142c

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1772631

Change-Id: I22af7ce6dd8bb525fa8b1548f0d11342482fdd5c
parents c6a0e8cb 8803142c
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -510,14 +510,6 @@ func (s FlagFilesByCategory) append(other FlagFilesByCategory) {
	}
}

// dedup removes duplicates in the flag files, while maintaining the order in which they were
// appended.
func (s FlagFilesByCategory) dedup() {
	for category, paths := range s {
		s[category] = android.FirstUniquePaths(paths)
	}
}

// HiddenAPIInfo contains information provided by the hidden API processing.
//
// That includes paths resolved from HiddenAPIFlagFileProperties and also generated by hidden API
+0 −14
Original line number Diff line number Diff line
@@ -74,9 +74,6 @@ func newMonolithicHiddenAPIInfo(ctx android.ModuleContext, flagFilesByCategory F
		}
	}

	// Dedup paths.
	monolithicInfo.dedup()

	return monolithicInfo
}

@@ -90,15 +87,4 @@ func (i *MonolithicHiddenAPIInfo) append(other *HiddenAPIInfo) {
	i.AllFlagsPaths = append(i.AllFlagsPaths, other.AllFlagsPath)
}

// dedup removes duplicates in all the paths, while maintaining the order in which they were
// appended.
func (i *MonolithicHiddenAPIInfo) dedup() {
	i.FlagsFilesByCategory.dedup()
	i.StubFlagsPaths = android.FirstUniquePaths(i.StubFlagsPaths)
	i.AnnotationFlagsPaths = android.FirstUniquePaths(i.AnnotationFlagsPaths)
	i.MetadataPaths = android.FirstUniquePaths(i.MetadataPaths)
	i.IndexPaths = android.FirstUniquePaths(i.IndexPaths)
	i.AllFlagsPaths = android.FirstUniquePaths(i.AllFlagsPaths)
}

var MonolithicHiddenAPIInfoProvider = blueprint.NewProvider(MonolithicHiddenAPIInfo{})