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)
|
fun testPlatformValidity(channels: SparseIntArray) = setChannelsCompat(staticBuilder, channels)
|
||||||
@RequiresApi(30)
|
@RequiresApi(30)
|
||||||
fun testPlatformValidity(bssid: MacAddress) = setBssid(staticBuilder, bssid)
|
fun testPlatformValidity(bssid: MacAddress) = setBssid(staticBuilder, bssid)
|
||||||
|
@RequiresApi(30)
|
||||||
|
fun testPlatformValidity(timeout: Long) = setShutdownTimeoutMillis(staticBuilder, timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
|
|||||||
@@ -293,9 +293,9 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
|||||||
dialogView.passwordWrapper.error = if (passwordValid) null else " "
|
dialogView.passwordWrapper.error = if (passwordValid) null else " "
|
||||||
val timeoutError = dialogView.timeout.text.let { text ->
|
val timeoutError = dialogView.timeout.text.let { text ->
|
||||||
if (text.isNullOrEmpty()) null else try {
|
if (text.isNullOrEmpty()) null else try {
|
||||||
text.toString().toLong()
|
SoftApConfigurationCompat.testPlatformValidity(text.toString().toLong())
|
||||||
null
|
null
|
||||||
} catch (e: NumberFormatException) {
|
} catch (e: Exception) {
|
||||||
e.readableMessage
|
e.readableMessage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user