summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt4
1 files changed, 1 insertions, 3 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt
index e43ddf3742..a04af6d8a8 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt
@@ -161,9 +161,7 @@ class ForegroundNotificationManager(val service: Service, val connectionProxy: C
}
fun onDestroy() {
- listenerId?.let { listener ->
- connectionProxy.onStateChange.unsubscribe(listener)
- }
+ connectionProxy.onStateChange.unsubscribe(listenerId)
service.apply {
unregisterReceiver(connectReceiver)