summaryrefslogtreecommitdiffhomepage
path: root/android/app/src
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2022-07-21 17:50:47 +0200
committerAlbin <albin@mullvad.net>2022-07-21 17:50:47 +0200
commit95554b61f7752b963d03cd96088de8ce2b8d172b (patch)
treee52c831396f869ddd01a010cea51d55c43ee6c93 /android/app/src
parenta8d3d1535cd100d62dcae43fbdb69bd726666976 (diff)
parentd5d35be3ed2bcd328f4c76000049e38d8ca5f82b (diff)
downloadmullvadvpn-95554b61f7752b963d03cd96088de8ce2b8d172b.tar.xz
mullvadvpn-95554b61f7752b963d03cd96088de8ce2b8d172b.zip
Merge branch 'fix-in-app-notification-url-crash'
Diffstat (limited to 'android/app/src')
-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 {