diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2014-10-02 11:11:58 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-02 11:11:58 +0000 |
commit | 58b8873278724098a44c07f664f1ca5eb9c23140 (patch) | |
tree | 0e6463af1fb44419240706554dc8d26c26e66829 /wifi/java/android/net | |
parent | f7cf5d43aa13405f9d0dd54f6038f710a0423323 (diff) | |
parent | 7fe95529e638467b77372dcac0efe51529e3bde1 (diff) | |
download | frameworks_base-58b8873278724098a44c07f664f1ca5eb9c23140.zip frameworks_base-58b8873278724098a44c07f664f1ca5eb9c23140.tar.gz frameworks_base-58b8873278724098a44c07f664f1ca5eb9c23140.tar.bz2 |
am 7fe95529: Merge "Revert the configKey generation algorithm to what it was in K." into lmp-dev
* commit '7fe95529e638467b77372dcac0efe51529e3bde1':
Revert the configKey generation algorithm to what it was in K.
Diffstat (limited to 'wifi/java/android/net')
-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; } |