diff options
author | Steven Liu <steveliu@google.com> | 2020-08-11 10:08:35 -0700 |
---|---|---|
committer | Steven Liu <steveliu@google.com> | 2020-08-13 09:38:51 -0700 |
commit | 29676fbdd2ad2a097f26cf241c830ea38bb0b3a6 (patch) | |
tree | e86566f7a7330d536366d85a69ec44f561502c25 /service | |
parent | 1252c1e8cd21a9b5878c2bdff1f9c1d234b74745 (diff) |
Do clean up on changing of the wifi configuration credential.
1. clean up the BssidBlockList;
2. take change of carrierId as change of credential;
Bug: 162861101
Test: atest com.android.server.wifi
Change-Id: I65374fa056baf7fc10d0a9ae955eabe3b0de063b
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/ClientModeImpl.java | 4 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigurationUtil.java | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 2a487e312..62ed64c35 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -1112,6 +1112,10 @@ public class ClientModeImpl extends StateMachine { // Clear invalid cached data. mWifiNative.removeNetworkCachedData(oldConfig.networkId); + if (WifiConfigurationUtil.hasCredentialChanged(oldConfig, newConfig)) { + mBssidBlocklistMonitor.handleNetworkRemoved(newConfig.SSID); + } + // Check if user/app change meteredOverride for connected network. if (newConfig.networkId != mLastNetworkId || newConfig.meteredOverride == oldConfig.meteredOverride) { diff --git a/service/java/com/android/server/wifi/WifiConfigurationUtil.java b/service/java/com/android/server/wifi/WifiConfigurationUtil.java index e5fda6774..f37472ead 100644 --- a/service/java/com/android/server/wifi/WifiConfigurationUtil.java +++ b/service/java/com/android/server/wifi/WifiConfigurationUtil.java @@ -307,6 +307,9 @@ public class WifiConfigurationUtil { if (existingConfig.requirePmf != newConfig.requirePmf) { return true; } + if (existingConfig.carrierId != newConfig.carrierId) { + return true; + } if (hasEnterpriseConfigChanged(existingConfig.enterpriseConfig, newConfig.enterpriseConfig)) { return true; |