summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt1
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/SplitTunneling.kt4
2 files changed, 5 insertions, 0 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 de29df9c57..00a30680de 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
@@ -54,6 +54,7 @@ class ServiceEndpoint(
keyStatusListener.onDestroy()
locationInfoCache.onDestroy()
settingsListener.onDestroy()
+ splitTunneling.onDestroy()
}
internal fun sendEvent(event: Event) {
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/SplitTunneling.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/SplitTunneling.kt
index ed7cc6fd9d..c078687704 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/SplitTunneling.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/SplitTunneling.kt
@@ -54,6 +54,10 @@ class SplitTunneling(context: Context) {
appListFile.writeText(excludedApps.joinToString(separator = "\n"))
}
+ fun onDestroy() {
+ onChange = null
+ }
+
private fun enabledChanged() {
preferences.edit().apply {
putBoolean(KEY_ENABLED, enabled)