diff options
author | Nate Jiang <qiangjiang@google.com> | 2020-03-09 17:49:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-09 17:49:58 +0000 |
commit | e4873b3556ec31131ae3fa5087dc8553cf4bd766 (patch) | |
tree | 6535654e0f0f15e492476c38dc4d49fb9defafb3 /service | |
parent | 57661374d87ce355b05cb71fa6f872dd6cfefed9 (diff) | |
parent | 46a566cbd3c73cdcb839e51472be5d1d3b817c4d (diff) |
Merge "The order of networks saved to disk based on SSID" into rvc-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/NetworkListStoreData.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/NetworkListStoreData.java b/service/java/com/android/server/wifi/NetworkListStoreData.java index 5be8261e7..c35a523c1 100644 --- a/service/java/com/android/server/wifi/NetworkListStoreData.java +++ b/service/java/com/android/server/wifi/NetworkListStoreData.java @@ -42,6 +42,8 @@ import org.xmlpull.v1.XmlSerializer; import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.List; /** @@ -146,6 +148,8 @@ public abstract class NetworkListStoreData implements WifiConfigStore.StoreData if (networkList == null) { return; } + // Sort by SSID + Collections.sort(networkList, Comparator.comparing(a -> a.SSID)); for (WifiConfiguration network : networkList) { serializeNetwork(out, network, encryptionUtil); } |