am a5fb1204: Merge "Fix incorrect exception being thrown from WifiConfiguration" into klp-dev

* commit 'a5fb1204385be2ab58bb4b653fbffae4f365b98c':
  Fix incorrect exception being thrown from WifiConfiguration
This commit is contained in:
Vinit Deshapnde
2013-09-20 12:32:22 -07:00
committed by Android Git Automerger

View File

@@ -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;