diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-02-02 18:02:19 +0000 |
|---|---|---|
| committer | Aleksandr Granin <aleksandr@mullvad.net> | 2021-04-08 13:26:19 +0200 |
| commit | b6e029089abe12908bd94150dd824d9176449fd8 (patch) | |
| tree | e79b2bca7469b770191910df93179934ee0f9c87 /android/src | |
| parent | 1701ade82ab8e644b2c874f6fcbe629e447d1438 (diff) | |
| download | mullvadvpn-b6e029089abe12908bd94150dd824d9176449fd8.tar.xz mullvadvpn-b6e029089abe12908bd94150dd824d9176449fd8.zip | |
Create a `SplitTunneling.onDestroy()` method
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/ServiceEndpoint.kt | 1 | ||||
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/endpoint/SplitTunneling.kt | 4 |
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) |
