summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-01-09 10:41:30 -0800
committerAndres Morales <anmorales@google.com>2015-01-09 10:42:34 -0800
commitff180659889ae6393a5bcf319aef01eeb3d91f64 (patch)
treef2aa5a5cc65780b4f677eb3d8e8dfd363907b95d
parent95302c119feba7f50a5193861619346908a96164 (diff)
downloadandroid_packages_apps_Nfc-ff180659889ae6393a5bcf319aef01eeb3d91f64.tar.gz
android_packages_apps_Nfc-ff180659889ae6393a5bcf319aef01eeb3d91f64.tar.bz2
android_packages_apps_Nfc-ff180659889ae6393a5bcf319aef01eeb3d91f64.zip
Only set WPA_PSK for WPA_PSK and WPA2_PSK
Bug: 18958216 Change-Id: Ib21b4417fa2ff618790f6c27016860400fdbb43d
-rw-r--r--src/com/android/nfc/NfcWifiProtectedSetup.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/com/android/nfc/NfcWifiProtectedSetup.java b/src/com/android/nfc/NfcWifiProtectedSetup.java
index ad6ef5bf..0b425d1d 100644
--- a/src/com/android/nfc/NfcWifiProtectedSetup.java
+++ b/src/com/android/nfc/NfcWifiProtectedSetup.java
@@ -159,13 +159,7 @@ public final class NfcWifiProtectedSetup {
}
private static void populateAllowedKeyManagement(BitSet allowedKeyManagement, short authType) {
- if (authType == AUTH_TYPE_WPA_PSK) {
- allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
- } else if (authType == AUTH_TYPE_WPA2_PSK) {
- allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
- } else if (authType == (AUTH_TYPE_WPA2_PSK | AUTH_TYPE_WPA_PSK)) {
- // only WPA_PSK and WPA2_PSK can be mixed together
- allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
+ if (authType == AUTH_TYPE_WPA_PSK || authType == AUTH_TYPE_WPA2_PSK) {
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
} else if (authType == AUTH_TYPE_WPA_EAP || authType == AUTH_TYPE_WPA2_EAP) {
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);