Fix permission issues on Android 13

This commit is contained in:
Mygod
2022-12-04 12:04:04 -05:00
parent 9804c2c3d4
commit 4943c45808
3 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,8 @@ abstract class IpMonitor {
"Dump (was interrupted and may be inconsistent.|terminated)$)").toRegex()
var currentMode: Mode
get() {
val isLegacy = Build.VERSION.SDK_INT < 30 || BuildConfig.TARGET_SDK < 30
// Completely restricted on Android 13: https://github.com/termux/termux-app/issues/2993#issuecomment-1250312777
val isLegacy = Build.VERSION.SDK_INT < 33 && (Build.VERSION.SDK_INT < 30 || BuildConfig.TARGET_SDK < 30)
val defaultMode = if (isLegacy) @Suppress("DEPRECATION") {
Mode.Poll
} else Mode.MonitorRoot

View File

@@ -120,7 +120,6 @@ data class SoftApConfigurationCompat(
"WPA3-OWE Transition",
"WPA3-OWE",
)
val DEFAULT_TIMEOUT = if (BuildConfig.TARGET_SDK >= 33 && Build.VERSION.SDK_INT >= 33) -1L else 0L
private val qrSanitizer = Regex("([\\\\\":;,])")