diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-12-03 21:09:15 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-12-03 21:09:15 -0800 |
commit | e8851f7a7cbdafbf0ea9a232249678ca42bb1cdc (patch) | |
tree | 37a3ad60d3841ecaf29afe9d380e45a38a551719 /service/java | |
parent | ca8d2fecf390a255381f45ee6d12420992b95c53 (diff) | |
parent | 78a2e373a3f20899f8f6ec3b493c1f8245af107d (diff) | |
download | android_frameworks_opt_net_wifi-e8851f7a7cbdafbf0ea9a232249678ca42bb1cdc.tar.gz android_frameworks_opt_net_wifi-e8851f7a7cbdafbf0ea9a232249678ca42bb1cdc.tar.bz2 android_frameworks_opt_net_wifi-e8851f7a7cbdafbf0ea9a232249678ca42bb1cdc.zip |
Merge "Do not add (anonymous) identity for EAP-SIM/AKA/AKA` networks."
Diffstat (limited to 'service/java')
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigStore.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java index b3ed8a633..103648f75 100644 --- a/service/java/com/android/server/wifi/WifiConfigStore.java +++ b/service/java/com/android/server/wifi/WifiConfigStore.java @@ -2938,6 +2938,56 @@ public class WifiConfigStore extends IpConfigStore { // No need to save realm or PLMN in supplicant continue; } + if (key.equals(WifiEnterpriseConfig.IDENTITY_KEY)) { + if ((config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.SIM)|| + (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA)|| + (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA_PRIME)) { + if ( (!newNetwork) && (value != null) && !mWifiNative.setNetworkVariable( + netId, + key, + "NULL")) { + loge(config.SSID + ": failed to set " + key + + ": " + value); + break setVariables; + } + } else { + if (!mWifiNative.setNetworkVariable( + netId, + key, + value)) { + removeKeys(enterpriseConfig); + loge(config.SSID + ": failed to set " + key + + ": " + value); + break setVariables; + } + } + continue; + } + if (key.equals(WifiEnterpriseConfig.ANON_IDENTITY_KEY)) { + if ((config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.SIM)|| + (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA)|| + (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA_PRIME)) { + if ( (!newNetwork) && (value != null) && !mWifiNative.setNetworkVariable( + netId, + key, + "NULL")) { + loge(config.SSID + ": failed to set " + key + + ": " + value); + break setVariables; + } + } else { + if (!mWifiNative.setNetworkVariable( + netId, + key, + value)) { + removeKeys(enterpriseConfig); + loge(config.SSID + ": failed to set " + key + + ": " + value); + break setVariables; + } + } + continue; + } if (!((newNetwork == false) && (savedValue != null) && (value != null) && value.equals(savedValue)) && !mWifiNative.setNetworkVariable( |