diff options
Diffstat (limited to 'android/src/main')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt | 9 |
1 files changed, 8 insertions, 1 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 f73a64d849..0a9a48e3fa 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt @@ -50,7 +50,7 @@ class ForegroundNotificationManager(val service: Service, val connectionProxy: C } private val shouldBeOnForeground - get() = !(tunnelState is TunnelState.Disconnected) + get() = lockedToForeground || !(tunnelState is TunnelState.Disconnected) private val notificationText: Int get() { @@ -142,12 +142,19 @@ class ForegroundNotificationManager(val service: Service, val connectionProxy: C var onConnect: (() -> Unit)? = null var onDisconnect: (() -> Unit)? = null + var loggedIn = false set(value) { field = value updateNotification() } + var lockedToForeground = false + set(value) { + field = value + updateNotificationForegroundStatus() + } + init { if (Build.VERSION.SDK_INT >= 26) { initChannel() |
