am 6245bd9e: am eef8d3eb: am df959707: am 7fe95529: Merge "Revert the configKey generation algorithm to what it was in K." into lmp-dev
* commit '6245bd9e19639ec3f64cae4268b204f8bfa0c6c9':
Revert the configKey generation algorithm to what it was in K.
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 @@
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;
}