Merge "Fix incorrect exception being thrown from WifiConfiguration" into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a5fb120438
@@ -554,8 +554,8 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public int getAuthType() {
|
public int getAuthType() {
|
||||||
if (allowedKeyManagement.cardinality() > 1) {
|
if (isValid() == false) {
|
||||||
throw new IllegalStateException("More than one auth type set");
|
throw new IllegalStateException("Invalid configuration");
|
||||||
}
|
}
|
||||||
if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
|
if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
|
||||||
return KeyMgmt.WPA_PSK;
|
return KeyMgmt.WPA_PSK;
|
||||||
|
|||||||
Reference in New Issue
Block a user