diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2014-09-30 18:30:04 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2014-09-30 18:30:58 +0900 |
commit | 8e1e34a3f659f76bbbfce2a2a8bdd3f471bf707d (patch) | |
tree | fcf8a57ff7f3a046528f9d64235ddcd01f16027a /wifi/java/android | |
parent | bc156ba430d286aaab8deb7bbb3bccc655cd2e92 (diff) | |
download | frameworks_base-8e1e34a3f659f76bbbfce2a2a8bdd3f471bf707d.zip frameworks_base-8e1e34a3f659f76bbbfce2a2a8bdd3f471bf707d.tar.gz frameworks_base-8e1e34a3f659f76bbbfce2a2a8bdd3f471bf707d.tar.bz2 |
Revert the configKey generation algorithm to what it was in K.
Bug: 17670914
Change-Id: Ibb2ea26ea28a38518caab7d1b45ae535a0eaf661
Diffstat (limited to 'wifi/java/android')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 4f5f31a..5514798 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -1222,18 +1222,15 @@ public class WifiConfiguration implements Parcelable { if (allowCached && mCachedConfigKey != null) { key = mCachedConfigKey; } else { - key = this.SSID; - if (key == null) - key = ""; - if (this.wepKeys[0] != null) { - key = key + "-WEP"; - } - if (this.allowedKeyManagement.get(KeyMgmt.WPA_PSK)) { - key = key + "-" + KeyMgmt.strings[KeyMgmt.WPA_PSK]; - } - if (this.allowedKeyManagement.get(KeyMgmt.WPA_EAP) || - this.allowedKeyManagement.get(KeyMgmt.IEEE8021X)) { - key = key + "-" + KeyMgmt.strings[KeyMgmt.WPA_EAP]; + if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) { + key = SSID + KeyMgmt.strings[KeyMgmt.WPA_PSK]; + } else if (allowedKeyManagement.get(KeyMgmt.WPA_EAP) || + allowedKeyManagement.get(KeyMgmt.IEEE8021X)) { + key = SSID + KeyMgmt.strings[KeyMgmt.WPA_EAP]; + } else if (wepKeys[0] != null) { + key = SSID + "WEP"; + } else { + key = SSID + KeyMgmt.strings[KeyMgmt.NONE]; } mCachedConfigKey = key; } |