Test timeout by platform as well
This commit is contained in:
@@ -364,6 +364,8 @@ data class SoftApConfigurationCompat(
|
||||
fun testPlatformValidity(channels: SparseIntArray) = setChannelsCompat(staticBuilder, channels)
|
||||
@RequiresApi(30)
|
||||
fun testPlatformValidity(bssid: MacAddress) = setBssid(staticBuilder, bssid)
|
||||
@RequiresApi(30)
|
||||
fun testPlatformValidity(timeout: Long) = setShutdownTimeoutMillis(staticBuilder, timeout)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
|
||||
@@ -293,9 +293,9 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
||||
dialogView.passwordWrapper.error = if (passwordValid) null else " "
|
||||
val timeoutError = dialogView.timeout.text.let { text ->
|
||||
if (text.isNullOrEmpty()) null else try {
|
||||
text.toString().toLong()
|
||||
SoftApConfigurationCompat.testPlatformValidity(text.toString().toLong())
|
||||
null
|
||||
} catch (e: NumberFormatException) {
|
||||
} catch (e: Exception) {
|
||||
e.readableMessage
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user