From 751eba205b50bf0a70ba30a1e99aa59f23206ad0 Mon Sep 17 00:00:00 2001 From: Arc Wang Date: Tue, 11 Jun 2019 11:40:59 +0800 Subject: [PATCH] [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 --- src/com/android/settings/wifi/dpp/WifiDppUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/settings/wifi/dpp/WifiDppUtils.java b/src/com/android/settings/wifi/dpp/WifiDppUtils.java index 4644f125017..7e15064b251 100644 --- a/src/com/android/settings/wifi/dpp/WifiDppUtils.java +++ b/src/com/android/settings/wifi/dpp/WifiDppUtils.java @@ -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()) {