Merge "wifi: add WAPI-CERT case for enterprise netowrk"

This commit is contained in:
TreeHugger Robot
2020-02-12 01:53:41 +00:00
committed by Android (Google) Code Review

View File

@@ -2140,7 +2140,8 @@ public class WifiConfiguration implements Parcelable {
public boolean isEnterprise() {
return (allowedKeyManagement.get(KeyMgmt.WPA_EAP)
|| allowedKeyManagement.get(KeyMgmt.IEEE8021X)
|| allowedKeyManagement.get(KeyMgmt.SUITE_B_192))
|| allowedKeyManagement.get(KeyMgmt.SUITE_B_192)
|| allowedKeyManagement.get(KeyMgmt.WAPI_CERT))
&& enterpriseConfig != null
&& enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE;
}
@@ -2416,6 +2417,9 @@ public class WifiConfiguration implements Parcelable {
if (allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) {
keyMgmt += KeyMgmt.strings[KeyMgmt.SUITE_B_192];
}
if (allowedKeyManagement.get(KeyMgmt.WAPI_CERT)) {
keyMgmt += KeyMgmt.strings[KeyMgmt.WAPI_CERT];
}
if (TextUtils.isEmpty(keyMgmt)) {
throw new IllegalStateException("Not an EAP network");