diff options
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt | 14 |
1 files changed, 4 insertions, 10 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 f44b045a15..4a753bc01d 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 @@ -28,8 +28,6 @@ class ServiceEndpoint( private val listeners = mutableSetOf<Messenger>() private val registrationQueue: SendChannel<Messenger> = startRegistrator() - private var version: String? = null - internal val dispatcher = DispatchingHandler(looper) { message -> Request.fromMessage(message) } @@ -42,6 +40,7 @@ class ServiceEndpoint( val settingsListener = SettingsListener(this) val accountCache = AccountCache(this) + val appVersionInfoCache = AppVersionInfoCache(this) val customDns = CustomDns(this) val keyStatusListener = KeyStatusListener(this) val locationInfoCache = LocationInfoCache(this) @@ -51,13 +50,6 @@ class ServiceEndpoint( dispatcher.registerHandler(Request.RegisterListener::class) { request -> registrationQueue.sendBlocking(request.listener) } - - intermittentDaemon.registerListener(this) { newDaemon -> - if (version == null && newDaemon != null) { - version = newDaemon.getCurrentVersion() - sendEvent(Event.CurrentVersion(version)) - } - } } fun onDestroy() { @@ -65,6 +57,7 @@ class ServiceEndpoint( registrationQueue.close() accountCache.onDestroy() + appVersionInfoCache.onDestroy() connectionProxy.onDestroy() customDns.onDestroy() keyStatusListener.onDestroy() @@ -118,7 +111,8 @@ class ServiceEndpoint( Event.NewLocation(locationInfoCache.location), Event.WireGuardKeyStatus(keyStatusListener.keyStatus), Event.SplitTunnelingUpdate(splitTunneling.onChange.latestEvent), - Event.CurrentVersion(version), + Event.CurrentVersion(appVersionInfoCache.currentVersion), + Event.AppVersionInfo(appVersionInfoCache.appVersionInfo), Event.ListenerReady ) |
