fix: 更新诸多bug
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user