Merge "[Wi-Fi] Fix transition mode problems" into qt-qpr1-dev am: 5b71fccabd
Change-Id: If7bce1789dd81d3f77766fd9ed71dbc6738fb857
This commit is contained in:
@@ -583,35 +583,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;
|
||||
@@ -634,8 +605,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
|
||||
config.shared = mSharedCheckBox.isChecked();
|
||||
|
||||
mAccessPointSecurity = convertSecurityTypeForMatching(mAccessPointSecurity);
|
||||
|
||||
switch (mAccessPointSecurity) {
|
||||
case AccessPoint.SECURITY_NONE:
|
||||
config.allowedKeyManagement.set(KeyMgmt.NONE);
|
||||
@@ -960,8 +929,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