refactor: Remove VpnService policy dialog

This commit is contained in:
purofle 2023-11-15 00:40:56 +08:00
parent ad8fa1d50c
commit eda33c870b
No known key found for this signature in database
GPG Key ID: 57DEC1478152D973

View File

@ -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) {