summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt1
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5e1a4b04ab..43e879ed5b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -55,6 +55,7 @@ Line wrap the file at 100 chars. Th
#### Android
- Make sure the settings screen is scrollable so that devices with small screens can access the quit
button.
+- Fix connectivity listener leak causing possible battery usage increase.
#### Windows
- Fix bug where failing to initialize the route manager could cause the daemon to get stuck in a
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt
index 7d04bcc2c7..a521bcebfd 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt
@@ -72,6 +72,7 @@ class LocationInfoCache(
}
fun onDestroy() {
+ connectivityListener.connectivityNotifier.unsubscribe(connectivityListenerId)
activeFetch?.cancel()
}