summaryrefslogtreecommitdiffstats
path: root/service/java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-12-03 21:09:15 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-12-03 21:09:15 -0800
commite8851f7a7cbdafbf0ea9a232249678ca42bb1cdc (patch)
tree37a3ad60d3841ecaf29afe9d380e45a38a551719 /service/java
parentca8d2fecf390a255381f45ee6d12420992b95c53 (diff)
parent78a2e373a3f20899f8f6ec3b493c1f8245af107d (diff)
downloadandroid_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.java50
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(