summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2014-10-02 13:48:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-02 13:48:12 +0000
commitfb223e848fee4fdd379f2f6190d51e877d02dca2 (patch)
treef199051926accefcf290c1b51dec798c7ebd8bd2 /wifi
parentbc69e3003853d6c31e4b57953af7a2e0bb294cc2 (diff)
parent65d720b3fb766f88c8f76bfba0538d0185cc6d21 (diff)
downloadframeworks_base-fb223e848fee4fdd379f2f6190d51e877d02dca2.zip
frameworks_base-fb223e848fee4fdd379f2f6190d51e877d02dca2.tar.gz
frameworks_base-fb223e848fee4fdd379f2f6190d51e877d02dca2.tar.bz2
am 65d720b3: am 6245bd9e: am eef8d3eb: am df959707: am 7fe95529: Merge "Revert the configKey generation algorithm to what it was in K." into lmp-dev
* commit '65d720b3fb766f88c8f76bfba0538d0185cc6d21': Revert the configKey generation algorithm to what it was in K.
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java21
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 6aa4328..1be6fdf 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -1297,18 +1297,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;
}