summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ConnectionProxy.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ConnectionProxy.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ConnectionProxy.kt
index 26456617f2..34702477dc 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ConnectionProxy.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ConnectionProxy.kt
@@ -9,6 +9,7 @@ import kotlinx.coroutines.channels.actor
import kotlinx.coroutines.channels.sendBlocking
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
+import net.mullvad.mullvadvpn.ipc.Event
import net.mullvad.mullvadvpn.model.TunnelState
import net.mullvad.mullvadvpn.ui.MainActivity
import net.mullvad.talpid.tunnel.ActionAfterDisconnect
@@ -46,6 +47,10 @@ class ConnectionProxy(val vpnPermission: VpnPermission, endpoint: ServiceEndpoin
daemon.registerListener(this) { newDaemon ->
newDaemon?.onTunnelStateChange = { newState -> handleNewState(newState) }
}
+
+ onStateChange.subscribe(this) { tunnelState ->
+ endpoint.sendEvent(Event.TunnelStateChange(tunnelState))
+ }
}
fun connect() {