summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-01-21 19:41:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-01-21 19:41:41 +0000
commitafc67ea99d7c69d7d855272ce6c90d6bb4119fd2 (patch)
tree55169153604c4587de5dccf02aea398647534e7c
parent60671e384552fe617d418e3998fad011bf9b5549 (diff)
parentff180659889ae6393a5bcf319aef01eeb3d91f64 (diff)
downloadandroid_packages_apps_Nfc-afc67ea99d7c69d7d855272ce6c90d6bb4119fd2.tar.gz
android_packages_apps_Nfc-afc67ea99d7c69d7d855272ce6c90d6bb4119fd2.tar.bz2
android_packages_apps_Nfc-afc67ea99d7c69d7d855272ce6c90d6bb4119fd2.zip
Merge "Only set WPA_PSK for WPA_PSK and WPA2_PSK" into lmp-mr1-dev
-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);