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

Commit 751eba20 authored by Arc Wang's avatar Arc Wang
Browse files

[Wi-Fi DPP] Support WPA2/WPA3 transition mode

This change shows buttons of QR code scnanner and QR code generator
for a connected Wi-Fi network.

Bug: 134706055
Test: Generate QR code for a WPA2/WPA3 personal transition mode Wi-Fi AP
          and check if the security type is WPA2 personal.
      Generate QR code for open network.
      Generate QR code for OWE network.
      Scan a QR code of open network, verify connection.
      Scan a QR code of OWE network, verify connection.
      Scan a QR code of WPA3 network, verify connection.
      Scan a QR code of WPA3 network, verify transition mode connection.

Change-Id: I60f2c38585f85745f992fa63a5ea85312f08c5e5
parent 352d866a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -205,6 +205,11 @@ public class WifiDppUtils {
        final WifiConfiguration wifiConfiguration = accessPoint.getConfig();
        setConfiguratorIntentExtra(intent, wifiManager, wifiConfiguration);

        // For a transition mode Wi-Fi AP, creates a QR code that's compatible with more devices
        if (accessPoint.getSecurity() == AccessPoint.SECURITY_PSK_SAE_TRANSITION) {
            intent.putExtra(EXTRA_WIFI_SECURITY, WifiQrCode.SECURITY_WPA_PSK);
        }

        return intent;
    }

@@ -400,6 +405,7 @@ public class WifiDppUtils {
                }
                break;
            case AccessPoint.SECURITY_PSK:
            case AccessPoint.SECURITY_PSK_SAE_TRANSITION:
                return true;
            default:
        }
@@ -412,6 +418,8 @@ public class WifiDppUtils {
            case AccessPoint.SECURITY_PSK:
            case AccessPoint.SECURITY_WEP:
            case AccessPoint.SECURITY_NONE:
            case AccessPoint.SECURITY_PSK_SAE_TRANSITION:
            case AccessPoint.SECURITY_OWE_TRANSITION:
                return true;
            case AccessPoint.SECURITY_SAE:
                if (wifiManager.isWpa3SaeSupported()) {