Fix android vpn issues
This commit is contained in:
@@ -174,19 +174,19 @@ class FlClashVpnService : VpnService() {
|
||||
inner class LocalBinder : Binder() {
|
||||
fun getService(): FlClashVpnService = this@FlClashVpnService
|
||||
|
||||
// override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean {
|
||||
// try {
|
||||
// val isSuccess = super.onTransact(code, data, reply, flags)
|
||||
// if (!isSuccess) {
|
||||
// CoroutineScope(Dispatchers.Main).launch {
|
||||
// GlobalState.getCurrentTitlePlugin()?.handleStop()
|
||||
// }
|
||||
// }
|
||||
// return isSuccess
|
||||
// } catch (e: RemoteException) {
|
||||
// throw e
|
||||
// }
|
||||
// }
|
||||
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean {
|
||||
try {
|
||||
val isSuccess = super.onTransact(code, data, reply, flags)
|
||||
if (!isSuccess) {
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
GlobalState.getCurrentTitlePlugin()?.handleStop()
|
||||
}
|
||||
}
|
||||
return isSuccess
|
||||
} catch (e: RemoteException) {
|
||||
throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,6 @@ class FlClashVpnService : VpnService() {
|
||||
}
|
||||
|
||||
override fun onUnbind(intent: Intent?): Boolean {
|
||||
GlobalState.getCurrentTitlePlugin()?.handleStop()
|
||||
return super.onUnbind(intent)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user