SurfaceFlinger: use std::set for DisplayConfigs
Use std::set instead of std::unordered::set in order to keep
the configs sorted. This is useful as we would return a sorted
vector from getAllowedDisplayConfigs() and the unittest expects that.
Test: adb shell /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test --gtest_filter=DisplayActiveConfigTest.allConfigsAllowed
Fixes: 130168276
Change-Id: Ifc1f2be561193d93032e99eb10faa7dcce1ff21d
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 7abcfee..7aa1108 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -1101,7 +1101,7 @@
scheduler::RefreshRateStats mRefreshRateStats{mRefreshRateConfigs, *mTimeStats};
// All configs are allowed if the set is empty.
- using DisplayConfigs = std::unordered_set<int32_t>;
+ using DisplayConfigs = std::set<int32_t>;
DisplayConfigs mAllowedDisplayConfigs GUARDED_BY(mStateLock);
std::mutex mActiveConfigLock;