Fix OWE passphrase toPlatform
This commit is contained in:
@@ -539,8 +539,12 @@ data class SoftApConfigurationCompat(
|
||||
val sac = underlying as? SoftApConfiguration
|
||||
val builder = if (sac == null) classBuilder.newInstance() else newBuilder.newInstance(sac)
|
||||
setSsid(builder, ssid)
|
||||
setPassphrase(builder, if (securityType == SoftApConfiguration.SECURITY_TYPE_OPEN) null else passphrase,
|
||||
securityType)
|
||||
setPassphrase(builder, when (securityType) {
|
||||
SoftApConfiguration.SECURITY_TYPE_OPEN,
|
||||
SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION,
|
||||
SoftApConfiguration.SECURITY_TYPE_WPA3_OWE -> null
|
||||
else -> passphrase
|
||||
}, securityType)
|
||||
setChannelsCompat(builder, channels)
|
||||
setBssid(builder, bssid?.toPlatform())
|
||||
setMaxNumberOfClients(builder, maxNumberOfClients)
|
||||
|
||||
@@ -356,7 +356,8 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
||||
} else dialogView.security.selectedItemPosition
|
||||
// see also: https://android.googlesource.com/platform/frameworks/base/+/92c8f59/wifi/java/android/net/wifi/SoftApConfiguration.java#688
|
||||
val passwordValid = when (selectedSecurity) {
|
||||
SoftApConfiguration.SECURITY_TYPE_OPEN, SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION,
|
||||
SoftApConfiguration.SECURITY_TYPE_OPEN,
|
||||
SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION,
|
||||
SoftApConfiguration.SECURITY_TYPE_WPA3_OWE -> true
|
||||
SoftApConfiguration.SECURITY_TYPE_WPA2_PSK, SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION -> {
|
||||
dialogView.password.length() in 8..63
|
||||
|
||||
Reference in New Issue
Block a user