summaryrefslogtreecommitdiffhomepage
path: root/android/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'android/src/main')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/AppVersionInfoCache.kt12
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt2
2 files changed, 2 insertions, 12 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/AppVersionInfoCache.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/AppVersionInfoCache.kt
index 7f428a716a..0c95293ae7 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/AppVersionInfoCache.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/AppVersionInfoCache.kt
@@ -1,16 +1,11 @@
package net.mullvad.mullvadvpn.service.endpoint
-import android.content.Context
import kotlin.properties.Delegates.observable
import net.mullvad.mullvadvpn.ipc.Event
import net.mullvad.mullvadvpn.model.AppVersionInfo
import net.mullvad.mullvadvpn.service.MullvadDaemon
-class AppVersionInfoCache(context: Context, endpoint: ServiceEndpoint) {
- companion object {
- val LEGACY_SHARED_PREFERENCES = "app_version_info_cache"
- }
-
+class AppVersionInfoCache(endpoint: ServiceEndpoint) {
private val daemon = endpoint.intermittentDaemon
var appVersionInfo by observable<AppVersionInfo?>(null) { _, _, info ->
@@ -24,11 +19,6 @@ class AppVersionInfoCache(context: Context, endpoint: ServiceEndpoint) {
private set
init {
- context.getSharedPreferences(LEGACY_SHARED_PREFERENCES, Context.MODE_PRIVATE)
- .edit()
- .clear()
- .commit()
-
daemon.registerListener(this) { newDaemon ->
newDaemon?.let { daemon ->
initializeCurrentVersion(daemon)
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 06c0c3926f..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
@@ -40,7 +40,7 @@ class ServiceEndpoint(
val settingsListener = SettingsListener(this)
val accountCache = AccountCache(this)
- val appVersionInfoCache = AppVersionInfoCache(context, this)
+ val appVersionInfoCache = AppVersionInfoCache(this)
val customDns = CustomDns(this)
val keyStatusListener = KeyStatusListener(this)
val locationInfoCache = LocationInfoCache(this)