fix: 更新诸多bug

This commit is contained in:
2026-01-08 03:49:59 -08:00
parent 8477c2e343
commit eb4fad64cb
11 changed files with 133 additions and 79 deletions
@@ -387,6 +387,11 @@ class BoxService(
stopService()
}
fun onTaskRemoved(intent: Intent?) {
Log.d(TAG, "📦 onTaskRemoved 被调用, 准备停止 VPN 服务")
stopService()
}
fun writeLog(message: String) {
binder.broadcast {
it.onServiceWriteLog(message)
@@ -38,6 +38,11 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
service.onDestroy()
}
override fun onTaskRemoved(rootIntent: Intent?) {
super.onTaskRemoved(rootIntent)
service.onTaskRemoved(rootIntent)
}
override fun onRevoke() {
runBlocking {
withContext(Dispatchers.Main) {