diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-02-17 11:49:57 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-02-17 11:49:57 -0800 |
commit | 7cb0d07fcf03150ecd04cc5c2573923dae72a366 (patch) | |
tree | 5a2b2a5aa59e85b104113ccdda73870505ac306d /wifi/java | |
parent | f653aa7e6e4d79dae191596551bfb5df4df6d6e5 (diff) | |
parent | ec8d23af7372204f068aebaa1bfae87dc9260e23 (diff) | |
download | frameworks_base-7cb0d07fcf03150ecd04cc5c2573923dae72a366.zip frameworks_base-7cb0d07fcf03150ecd04cc5c2573923dae72a366.tar.gz frameworks_base-7cb0d07fcf03150ecd04cc5c2573923dae72a366.tar.bz2 |
Merge "Add WPA support for soft Ap"
Diffstat (limited to 'wifi/java')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index d5fb63e..28a5bc6 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -107,9 +107,16 @@ public class WifiConfiguration implements Parcelable { * generated WEP keys. */ public static final int IEEE8021X = 3; + /** WPA2 pre-shared key for use with soft access point + * (requires {@code preSharedKey} to be specified). + * @hide + */ + public static final int WPA2_PSK = 4; + public static final String varName = "key_mgmt"; - public static final String[] strings = { "NONE", "WPA_PSK", "WPA_EAP", "IEEE8021X" }; + public static final String[] strings = { "NONE", "WPA_PSK", "WPA_EAP", "IEEE8021X", + "WPA2_PSK" }; } /** @@ -480,6 +487,20 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(nextSetBit); } + /** @hide */ + public int getAuthType() { + if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) { + return KeyMgmt.WPA_PSK; + } else if (allowedKeyManagement.get(KeyMgmt.WPA2_PSK)) { + return KeyMgmt.WPA2_PSK; + } else if (allowedKeyManagement.get(KeyMgmt.WPA_EAP)) { + return KeyMgmt.WPA_EAP; + } else if (allowedKeyManagement.get(KeyMgmt.IEEE8021X)) { + return KeyMgmt.IEEE8021X; + } + return KeyMgmt.NONE; + } + /** Implement the Parcelable interface {@hide} */ public int describeContents() { return 0; |