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

Commit 18994c73 authored by Cole Faust's avatar Cole Faust
Browse files

Replace SortedStringKeys with SortedKeys

Now that we have generics.

Bug: 193460475
Test: presubmits
Change-Id: I1594fd8feb505175d5c09c03ef397e5ffd5b09cb
parent 20eed826
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -817,7 +817,7 @@ func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion
	var flatContent strings.Builder

	fmt.Fprintf(&fullContent, "%s(minSdkVersion:%s):\n", ctx.ModuleName(), minSdkVersion)
	for _, key := range FirstUniqueStrings(SortedStringKeys(depInfos)) {
	for _, key := range FirstUniqueStrings(SortedKeys(depInfos)) {
		info := depInfos[key]
		toName := fmt.Sprintf("%s(minSdkVersion:%s)", info.To, info.MinSdkVersion)
		if info.IsExternal {
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ func InitDefaultsModule(module DefaultsModule) {
			delete(propertiesSet, "visibility")

			// Replace the "*" with the names of all the properties that have been set.
			protectedProperties = SortedStringKeys(propertiesSet)
			protectedProperties = SortedKeys(propertiesSet)
			module.setProtectedProperties(protectedProperties)
		} else {
			for _, property := range protectedProperties {
+4 −4
Original line number Diff line number Diff line
@@ -3675,7 +3675,7 @@ func AddAncestors(ctx SingletonContext, dirMap map[string]Paths, mmName func(str
	// Ensure ancestor directories are in dirMap
	// Make directories build their direct subdirectories
	// Returns a slice of all directories and a slice of top-level directories.
	dirs := SortedStringKeys(dirMap)
	dirs := SortedKeys(dirMap)
	for _, dir := range dirs {
		dir := parentDir(dir)
		for dir != "." && dir != "/" {
@@ -3686,7 +3686,7 @@ func AddAncestors(ctx SingletonContext, dirMap map[string]Paths, mmName func(str
			dir = parentDir(dir)
		}
	}
	dirs = SortedStringKeys(dirMap)
	dirs = SortedKeys(dirMap)
	var topDirs []string
	for _, dir := range dirs {
		p := parentDir(dir)
@@ -3696,7 +3696,7 @@ func AddAncestors(ctx SingletonContext, dirMap map[string]Paths, mmName func(str
			topDirs = append(topDirs, dir)
		}
	}
	return SortedStringKeys(dirMap), topDirs
	return SortedKeys(dirMap), topDirs
}

func (c *buildTargetSingleton) GenerateBuildActions(ctx SingletonContext) {
@@ -3782,7 +3782,7 @@ func (c *buildTargetSingleton) GenerateBuildActions(ctx SingletonContext) {
	}

	// Wrap those into host|host-cross|target phony rules
	for _, class := range SortedStringKeys(osClass) {
	for _, class := range SortedKeys(osClass) {
		ctx.Phony(class, osClass[class]...)
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -542,7 +542,7 @@ func (r *rule) String() string {
		s = append(s, fmt.Sprintf("properties matching: %s", r.props))
	}
	if len(r.directDeps) > 0 {
		s = append(s, fmt.Sprintf("dep(s): %q", SortedStringKeys(r.directDeps)))
		s = append(s, fmt.Sprintf("dep(s): %q", SortedKeys(r.directDeps)))
	}
	if len(r.osClasses) > 0 {
		s = append(s, fmt.Sprintf("os class(es): %q", r.osClasses))
+1 −1
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ func (p *PackagingBase) GatherPackagingSpecs(ctx ModuleContext) map[string]Packa
// entries into the specified directory.
func (p *PackagingBase) CopySpecsToDir(ctx ModuleContext, builder *RuleBuilder, specs map[string]PackagingSpec, dir ModuleOutPath) (entries []string) {
	seenDir := make(map[string]bool)
	for _, k := range SortedStringKeys(specs) {
	for _, k := range SortedKeys(specs) {
		ps := specs[k]
		destPath := dir.Join(ctx, ps.relPathInPackage).String()
		destDir := filepath.Dir(destPath)
Loading