summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorVinit Deshapnde <vinitd@google.com>2013-09-20 12:34:58 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-20 12:34:58 -0700
commitce34f22b6985e282625293a3dcdb6ea702ab6a98 (patch)
tree1ef88afd3de600945bd7cda60c3b3249c708807f /wifi
parent3df66d27588cdd4e2bbf65387c91197651b62ac9 (diff)
parent27271f673546faa973d7a24c594da626ebdbd337 (diff)
downloadframeworks_base-ce34f22b6985e282625293a3dcdb6ea702ab6a98.zip
frameworks_base-ce34f22b6985e282625293a3dcdb6ea702ab6a98.tar.gz
frameworks_base-ce34f22b6985e282625293a3dcdb6ea702ab6a98.tar.bz2
am 27271f67: am a5fb1204: Merge "Fix incorrect exception being thrown from WifiConfiguration" into klp-dev
* commit '27271f673546faa973d7a24c594da626ebdbd337': Fix incorrect exception being thrown from WifiConfiguration
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index 2b3c9e2..4c84f17 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -554,8 +554,8 @@ public class WifiConfiguration implements Parcelable {
/** @hide */
public int getAuthType() {
- if (allowedKeyManagement.cardinality() > 1) {
- throw new IllegalStateException("More than one auth type set");
+ if (isValid() == false) {
+ throw new IllegalStateException("Invalid configuration");
}
if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
return KeyMgmt.WPA_PSK;