mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-18 22:20:06 +08:00
refactor: Remove VpnService policy dialog
This commit is contained in:
parent
ad8fa1d50c
commit
eda33c870b
@ -37,7 +37,6 @@ import io.nekohasekai.sagernet.group.GroupUpdater
|
||||
import io.nekohasekai.sagernet.ktx.*
|
||||
import io.nekohasekai.sagernet.widget.ListHolderListener
|
||||
import moe.matsuri.nb4a.utils.Util
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
class MainActivity : ThemedActivity(),
|
||||
@ -111,25 +110,6 @@ class MainActivity : ThemedActivity(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// consent
|
||||
try {
|
||||
val f = File(application.filesDir, "consent")
|
||||
if (!f.exists()) {
|
||||
MaterialAlertDialogBuilder(this@MainActivity)
|
||||
.setTitle("VpnService policy")
|
||||
.setMessage("Since the main function of this application is VPN, it must use VpnService.")
|
||||
.setPositiveButton(R.string.yes) { _, _ ->
|
||||
f.createNewFile()
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel) { _, _ ->
|
||||
finish()
|
||||
}
|
||||
.show()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Logs.w(e)
|
||||
}
|
||||
}
|
||||
|
||||
fun refreshNavMenu(clashApi: Boolean) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user