diff options
author | Vinit Deshapnde <vinitd@google.com> | 2013-09-06 17:26:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-06 17:26:39 +0000 |
commit | 771c11b73941994d24e5da5851451ee4088499a6 (patch) | |
tree | 7845d7300b693763770252c1ce2dcfd71a10fa0f /wifi/java/android | |
parent | dc8d704899716e97e59af8b6fe5f549e0229eda6 (diff) | |
parent | 1ed7a0200ac705b20f71193030a59edd8361200b (diff) | |
download | frameworks_base-771c11b73941994d24e5da5851451ee4088499a6.zip frameworks_base-771c11b73941994d24e5da5851451ee4088499a6.tar.gz frameworks_base-771c11b73941994d24e5da5851451ee4088499a6.tar.bz2 |
Merge "Fix duplicate SSID entries in the WifiSettings UI" into klp-dev
Diffstat (limited to 'wifi/java/android')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfigStore.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfigStore.java b/wifi/java/android/net/wifi/WifiConfigStore.java index 4baab1f..ea7904c 100644 --- a/wifi/java/android/net/wifi/WifiConfigStore.java +++ b/wifi/java/android/net/wifi/WifiConfigStore.java @@ -680,9 +680,15 @@ class WifiConfigStore { } config.ipAssignment = IpAssignment.DHCP; config.proxySettings = ProxySettings.NONE; - mConfiguredNetworks.put(config.networkId, config); - mNetworkIds.put(configKey(config), config.networkId); - localLog("loaded configured network", config.networkId); + + if (mNetworkIds.containsKey(configKey(config))) { + // That SSID is already known, just ignore this duplicate entry + localLog("discarded duplicate network", config.networkId); + } else { + mConfiguredNetworks.put(config.networkId, config); + mNetworkIds.put(configKey(config), config.networkId); + localLog("loaded configured network", config.networkId); + } } readIpAndProxyConfigurations(); |