Fix requiresUpdate default value
This commit is contained in:
@@ -2,7 +2,6 @@ package be.mygod.vpnhotspot
|
|||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ enum class TetherType(@DrawableRes val icon: Int) {
|
|||||||
private lateinit var bluetoothRegexs: List<Pattern>
|
private lateinit var bluetoothRegexs: List<Pattern>
|
||||||
private var ncmRegexs = emptyList<Pattern>()
|
private var ncmRegexs = emptyList<Pattern>()
|
||||||
private val ethernetRegex: Pattern?
|
private val ethernetRegex: Pattern?
|
||||||
private var requiresUpdate = true
|
private var requiresUpdate = false
|
||||||
|
|
||||||
@RequiresApi(30) // unused on lower APIs
|
@RequiresApi(30) // unused on lower APIs
|
||||||
val listener = Event0()
|
val listener = Event0()
|
||||||
@@ -68,8 +68,8 @@ enum class TetherType(@DrawableRes val icon: Int) {
|
|||||||
init {
|
init {
|
||||||
val system = "android" to Resources.getSystem()
|
val system = "android" to Resources.getSystem()
|
||||||
if (BuildCompat.isAtLeastR()) {
|
if (BuildCompat.isAtLeastR()) {
|
||||||
|
requiresUpdate = true
|
||||||
TetheringManager.registerTetheringEventCallback(null, this)
|
TetheringManager.registerTetheringEventCallback(null, this)
|
||||||
updateRegexs()
|
|
||||||
} else {
|
} else {
|
||||||
usbRegexs = system.getRegexs("config_tether_usb_regexs")
|
usbRegexs = system.getRegexs("config_tether_usb_regexs")
|
||||||
wifiRegexs = system.getRegexs("config_tether_wifi_regexs")
|
wifiRegexs = system.getRegexs("config_tether_wifi_regexs")
|
||||||
|
|||||||
Reference in New Issue
Block a user