Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae6f6ab0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[OWE] Support OWE in transition mode" into qt-dev

parents 421a05a6 98aa52db
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -582,9 +582,11 @@ public class WifiConfigController implements TextWatcher,
    }

    /**
     * Special handling for WPA2/WPA3 in Transition mode: The key SECURITY_PSK_SAE_TRANSITION is
     * a pseudo key which results 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.
     * 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)
@@ -597,6 +599,14 @@ public class WifiConfigController implements TextWatcher,
                return AccessPoint.SECURITY_PSK;
            }
        }
        if (accessPointSecurity == AccessPoint.SECURITY_OWE_TRANSITION) {
            if (mWifiManager.isEnhancedOpenSupported()) {
                return AccessPoint.SECURITY_OWE;
            } else {
                return AccessPoint.SECURITY_NONE;
            }
        }

        return accessPointSecurity;
    }

@@ -948,7 +958,8 @@ public class WifiConfigController implements TextWatcher,

    private void showSecurityFields() {
        if (mAccessPointSecurity == AccessPoint.SECURITY_NONE ||
                  mAccessPointSecurity == AccessPoint.SECURITY_OWE) {
                mAccessPointSecurity == AccessPoint.SECURITY_OWE ||
                mAccessPointSecurity == AccessPoint.SECURITY_OWE_TRANSITION) {
            mView.findViewById(R.id.security_fields).setVisibility(View.GONE);
            return;
        }
+5 −2
Original line number Diff line number Diff line
@@ -494,7 +494,9 @@ public class WifiSettings extends RestrictedSettingsFragment
                if (isSavedNetwork) {
                    connect(mSelectedAccessPoint.getConfig(), isSavedNetwork);
                } else if ((mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_NONE) ||
                        (mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_OWE)) {
                        (mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_OWE) ||
                        (mSelectedAccessPoint.getSecurity()
                                == AccessPoint.SECURITY_OWE_TRANSITION)) {
                    /** Bypass dialog for unsecured networks */
                    mSelectedAccessPoint.generateOpenNetworkConfig();
                    connect(mSelectedAccessPoint.getConfig(), isSavedNetwork);
@@ -748,7 +750,8 @@ public class WifiSettings extends RestrictedSettingsFragment
                preference.setOrder(index);
                if (mOpenSsid != null && mOpenSsid.equals(accessPoint.getSsidStr())
                        && (accessPoint.getSecurity() != AccessPoint.SECURITY_NONE &&
                        accessPoint.getSecurity() != AccessPoint.SECURITY_OWE)) {
                        accessPoint.getSecurity() != AccessPoint.SECURITY_OWE &&
                        accessPoint.getSecurity() != AccessPoint.SECURITY_OWE_TRANSITION)) {
                    if (!accessPoint.isSaved() || isDisabledByWrongPassword(accessPoint)) {
                        onPreferenceTreeClick(preference);
                        mOpenSsid = null;
+2 −1
Original line number Diff line number Diff line
@@ -268,7 +268,8 @@ public class WifiUtils {
        if (accessPoint.isOsuProvider()) {
            return CONNECT_TYPE_OSU_PROVISION;
        } else if ((accessPoint.getSecurity() == AccessPoint.SECURITY_NONE) ||
                (accessPoint.getSecurity() == AccessPoint.SECURITY_OWE)) {
                (accessPoint.getSecurity() == AccessPoint.SECURITY_OWE) ||
                (accessPoint.getSecurity() == AccessPoint.SECURITY_OWE_TRANSITION)) {
            return CONNECT_TYPE_OPEN_NETWORK;
        } else if (accessPoint.isSaved() && config != null
                && config.getNetworkSelectionStatus() != null