mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
Fix rebinding to the service
This commit is contained in:
@@ -216,7 +216,16 @@ class AmneziaVpnService : VpnService() {
|
||||
clientMessenger.reset()
|
||||
if (isUnknown || isDisconnected) stopSelf()
|
||||
}
|
||||
return super.onUnbind(intent)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onRebind(intent: Intent?) {
|
||||
Log.d(TAG, "onRebind by $intent")
|
||||
if (intent?.action != "android.net.VpnService") {
|
||||
isServiceBound = true
|
||||
if (isConnected) launchSendingStatistics()
|
||||
}
|
||||
super.onRebind(intent)
|
||||
}
|
||||
|
||||
override fun onRevoke() {
|
||||
|
||||
Reference in New Issue
Block a user