Some networks can not connect automatically.
Becasuse the key of scan cache is supplicant's networkid,
when supplicant process restart, the supplicant's networkid
may be regenerated, so clear scan cache when loading the
configured networks.
BUG: 30158982
Change-Id: Iec94e8eef517bd0411eb0be53a31cdb34a1494cf
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index dbe67e8..94879a0 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -1653,6 +1653,7 @@
// 2) mConfiguredNetworks caches a Passpoint network's FQDN the moment the network is added.
// Thus, we had to load the FQDNs first.
mConfiguredNetworks.clear();
+ mScanDetailCaches.clear();
for (Map.Entry<String, WifiConfiguration> entry : configs.entrySet()) {
final String configKey = entry.getKey();
final WifiConfiguration config = entry.getValue();