diff options
| author | Albin <albin@mullvad.net> | 2022-07-21 17:50:47 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2022-07-21 17:50:47 +0200 |
| commit | 95554b61f7752b963d03cd96088de8ce2b8d172b (patch) | |
| tree | e52c831396f869ddd01a010cea51d55c43ee6c93 /android/app/src | |
| parent | a8d3d1535cd100d62dcae43fbdb69bd726666976 (diff) | |
| parent | d5d35be3ed2bcd328f4c76000049e38d8ca5f82b (diff) | |
| download | mullvadvpn-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.kt | 6 |
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 { |
