Move away KEY_OPERATING_CHANNEL

This commit is contained in:
Mygod
2019-02-01 16:46:00 +08:00
parent 9352f10e6c
commit 6a7a16a0c7
3 changed files with 11 additions and 10 deletions

View File

@@ -23,8 +23,6 @@ import java.util.*
class App : Application() {
companion object {
const val KEY_OPERATING_CHANNEL = "service.repeater.oc"
@SuppressLint("StaticFieldLeak")
lateinit var app: App
}
@@ -80,10 +78,6 @@ class App : Application() {
.build()
}
val operatingChannel: Int get() {
val result = pref.getString(KEY_OPERATING_CHANNEL, null)?.toIntOrNull() ?: 0
return if (result in 1..165) result else 0
}
val masquerade get() = pref.getBoolean("service.masquerade", true)
val dhcpWorkaround get() = pref.getBoolean("service.dhcpWorkaround", false)