diff options
author | Vinit Deshapnde <vinitd@google.com> | 2013-09-20 10:12:30 -0700 |
---|---|---|
committer | Vinit Deshapnde <vinitd@google.com> | 2013-09-20 10:12:30 -0700 |
commit | 0fd3b1be14ec6b6ba33140efa321b27dc3bf2862 (patch) | |
tree | dcf7133106413cbe1649140b98f6215fae0a8085 /wifi | |
parent | 6df7d4a574ffd85c82cad402552e3854df3a3f85 (diff) | |
download | frameworks_base-0fd3b1be14ec6b6ba33140efa321b27dc3bf2862.zip frameworks_base-0fd3b1be14ec6b6ba33140efa321b27dc3bf2862.tar.gz frameworks_base-0fd3b1be14ec6b6ba33140efa321b27dc3bf2862.tar.bz2 |
Fix incorrect exception being thrown from WifiConfiguration
Bug: 10817189
Change-Id: Ib2985f50080cb9d983a6de6ce668223e8782c3b6
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 4 |
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; |