summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/NotificationWithUrl.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/NotificationWithUrl.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/NotificationWithUrl.kt
index 4257f8d2a6..8e03db6df5 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/NotificationWithUrl.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/notification/NotificationWithUrl.kt
@@ -2,6 +2,7 @@ package net.mullvad.mullvadvpn.ui.notification
import android.content.Context
import android.content.Intent
+import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
import android.net.Uri
abstract class NotificationWithUrl(
@@ -11,7 +12,10 @@ abstract class NotificationWithUrl(
private val url = Uri.parse(context.getString(urlId))
protected val openUrl: suspend () -> Unit = {
- context.startActivity(Intent(Intent.ACTION_VIEW, url))
+ val intent = Intent(Intent.ACTION_VIEW, url).apply {
+ flags = FLAG_ACTIVITY_NEW_TASK
+ }
+ context.startActivity(intent)
}
init {