- /**
- * 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;
- }
-