Make the order of cases stable when creating new configurables.
Otherwise the properties hash values will change randomly.
Bug: 358427516
Test: Manual tests.
Change-Id: I3d2adeeb1d127a8337eed5843d5b1c9cecf3a76c
diff --git a/android/configurable_properties.go b/android/configurable_properties.go
index 2c794a1..bde33e9 100644
--- a/android/configurable_properties.go
+++ b/android/configurable_properties.go
@@ -7,7 +7,8 @@
// to indicate a "default" case.
func CreateSelectOsToBool(cases map[string]*bool) proptools.Configurable[bool] {
var resultCases []proptools.ConfigurableCase[bool]
- for pattern, value := range cases {
+ for _, pattern := range SortedKeys(cases) {
+ value := cases[pattern]
if pattern == "" {
resultCases = append(resultCases, proptools.NewConfigurableCase(
[]proptools.ConfigurablePattern{proptools.NewDefaultConfigurablePattern()},