Add Hotspot WPA3 Settings
- Add WPA3 SAE security types - "WPA3-Personal" - "WPA2/WPA3-Personal" - Verify valid WPA3 password - Enable QR code scanner for Hotspot WPA3 - Screenshot https://screenshot.googleplex.com/B6u54wh8w35Xnyf https://screenshot.googleplex.com/8hWHHUTb6UaS9vB Bug: 167968488 Test: - Manual Test - atest WifiTetherSecurityPreferenceControllerTest - atest WifiUtilsTest Change-Id: I155ed0bfd187d27ba864f9fb1b78d08c437740f3
This commit is contained in:
@@ -56,12 +56,12 @@ public class WifiUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the WPA2-PSK hotspot password is valid.
|
||||
* Check if the hotspot password is valid.
|
||||
*/
|
||||
public static boolean isHotspotWpa2PasswordValid(String password) {
|
||||
public static boolean isHotspotPasswordValid(String password, int securityType) {
|
||||
final SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
|
||||
try {
|
||||
configBuilder.setPassphrase(password, SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
|
||||
configBuilder.setPassphrase(password, securityType);
|
||||
} catch (IllegalArgumentException e) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user