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/ServiceEndpoint.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt
index 188f75a0ea..93c7a8a9cf 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt
@@ -109,7 +109,7 @@ class ServiceEndpoint(
synchronized(this) {
listeners.add(listener)
- val initialEvents = listOf(
+ val initialEvents = mutableListOf(
Event.TunnelStateChange(connectionProxy.state),
Event.LoginStatus(accountCache.onLoginStatusChange.latestEvent),
Event.AccountHistory(accountCache.onAccountHistoryChange.latestEvent),
@@ -124,6 +124,10 @@ class ServiceEndpoint(
Event.ListenerReady
)
+ if (vpnPermission.waitingForResponse) {
+ initialEvents.add(Event.VpnPermissionRequest)
+ }
+
initialEvents.forEach { event ->
listener.send(event.message)
}