From 31ec8d39d800bea50e8d7c08e9dcb18c89a6fbf6 Mon Sep 17 00:00:00 2001 From: yostyle Date: Thu, 28 Oct 2021 17:36:27 +0200 Subject: [PATCH] Open url on external browser task --- .../java/im/vector/app/core/utils/ExternalApplicationsUtil.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt b/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt index bdaf520ba1..17e9e117a7 100644 --- a/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt +++ b/vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt @@ -76,6 +76,8 @@ fun openUrlInExternalBrowser(context: Context, url: String?) { fun openUrlInExternalBrowser(context: Context, uri: Uri?) { uri?.let { val browserIntent = Intent(Intent.ACTION_VIEW, it).apply { + // Open activity on browser task and not on element task + flags = Intent.FLAG_ACTIVITY_NEW_TASK putExtra(Browser.EXTRA_APPLICATION_ID, context.packageName) putExtra(Browser.EXTRA_CREATE_NEW_TAB, true) }