diff options
Diffstat (limited to 'android/app/src')
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt | 4 | ||||
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt index 09ccf1677a..2592b17529 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt @@ -128,6 +128,10 @@ class ForegroundNotificationManager( } } + fun cancelNotification() { + tunnelStateNotification.visible = false + } + private fun updateNotificationAction() { tunnelStateNotification.showAction = loggedIn && deviceIsUnlocked } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt index d09472fa3d..9e52bebdd5 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadVpnService.kt @@ -174,6 +174,7 @@ class MullvadVpnService : TalpidVpnService() { connectionProxy.onStateChange.latestEvent.let { tunnelState -> Log.d(TAG, "Task removed (tunnelState=$tunnelState)") if (tunnelState == TunnelState.Disconnected) { + notificationManager.cancelNotification() stop() } } |
