Fix dist sorting

When comparing with 2 keys, you need to only compare the second key
if the first key was equal. We were comparing the second key if the
first key was greater than or equal.

This was causing kati to rerun more than it should.

Test: m nothing, edit android.bp, m nothing, see only soong reran
Change-Id: I7a784411f074b81e92481a2a556994b29ffe0e31
diff --git a/android/makevars.go b/android/makevars.go
index 45fd0d0..baa1d44 100644
--- a/android/makevars.go
+++ b/android/makevars.go
@@ -328,19 +328,12 @@
 	sort.Slice(phonies, func(i, j int) bool {
 		return phonies[i].name < phonies[j].name
 	})
-	lessArr := func(a, b []string) bool {
-		if len(a) == len(b) {
-			for i := range a {
-				if a[i] < b[i] {
-					return true
-				}
-			}
-			return false
-		}
-		return len(a) < len(b)
-	}
 	sort.Slice(dists, func(i, j int) bool {
-		return lessArr(dists[i].goals, dists[j].goals) || lessArr(dists[i].paths.Strings(), dists[j].paths.Strings())
+		goals := slices.Compare(dists[i].goals, dists[j].goals)
+		if goals != 0 {
+			return goals < 0
+		}
+		return slices.Compare(dists[i].paths.Strings(), dists[j].paths.Strings()) < 0
 	})
 
 	outBytes := s.writeVars(vars)