[Wi-Fi] Fix transition mode problems
Replace SECURITY_PSK_SAE_TRANSITION & SECURITY_OWE_TRANSITION with AccessPpoint#isPskSaeTransitionMode() & AccessPpoint#isPskOweTransitionMode() Bug: 144320676 Bug: 144320649 Bug: 144325162 Bug: 144321574 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi Change-Id: Ic3c7ac1238a51b6e215ed63761720d2bc371d012
This commit is contained in:
@@ -607,35 +607,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Special handling for WPA2/WPA3 and OWE in Transition mode: The key
|
||||
* SECURITY_PSK_SAE_TRANSITION and SECURITY_OWE_TRANSITION are pseudo keys which result by the
|
||||
* scan results, but never appears in the saved networks.
|
||||
* A saved network is either WPA3 for supporting devices or WPA2 for non-supporting devices,
|
||||
* or, OWE for supporting devices or Open for non-supporting devices.
|
||||
*
|
||||
* @param accessPointSecurity Access point current security type
|
||||
* @return Converted security type (if required)
|
||||
*/
|
||||
private int convertSecurityTypeForMatching(int accessPointSecurity) {
|
||||
if (accessPointSecurity == AccessPoint.SECURITY_PSK_SAE_TRANSITION) {
|
||||
if (mWifiManager.isWpa3SaeSupported()) {
|
||||
return AccessPoint.SECURITY_SAE;
|
||||
} else {
|
||||
return AccessPoint.SECURITY_PSK;
|
||||
}
|
||||
}
|
||||
if (accessPointSecurity == AccessPoint.SECURITY_OWE_TRANSITION) {
|
||||
if (mWifiManager.isEnhancedOpenSupported()) {
|
||||
return AccessPoint.SECURITY_OWE;
|
||||
} else {
|
||||
return AccessPoint.SECURITY_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
return accessPointSecurity;
|
||||
}
|
||||
|
||||
public WifiConfiguration getConfig() {
|
||||
if (mMode == WifiConfigUiBase.MODE_VIEW) {
|
||||
return null;
|
||||
@@ -658,8 +629,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
|
||||
config.shared = mSharedCheckBox.isChecked();
|
||||
|
||||
mAccessPointSecurity = convertSecurityTypeForMatching(mAccessPointSecurity);
|
||||
|
||||
switch (mAccessPointSecurity) {
|
||||
case AccessPoint.SECURITY_NONE:
|
||||
config.allowedKeyManagement.set(KeyMgmt.NONE);
|
||||
@@ -1017,8 +986,7 @@ public class WifiConfigController implements TextWatcher,
|
||||
|
||||
private void showSecurityFields(boolean refreshEapMethods, boolean refreshCertificates) {
|
||||
if (mAccessPointSecurity == AccessPoint.SECURITY_NONE ||
|
||||
mAccessPointSecurity == AccessPoint.SECURITY_OWE ||
|
||||
mAccessPointSecurity == AccessPoint.SECURITY_OWE_TRANSITION) {
|
||||
mAccessPointSecurity == AccessPoint.SECURITY_OWE) {
|
||||
mView.findViewById(R.id.security_fields).setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user