Fix permission issues on Android 13
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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("([\\\\\":;,])")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user