wifi: add WAPI-CERT case for enterprise netowrk

Bug: 139257562
Test: atest FrameworksWifiApiTests
Change-Id: Iec704314a082fe5c664336f3e802ef701fffc2aa
This commit is contained in:
Jimmy Chen
2020-02-11 11:08:32 +08:00
parent 6a1e0b72e3
commit d2348e128b

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");