diff --git a/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt b/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt index 5d1893db5c91..04d01fb86d55 100644 --- a/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt +++ b/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt @@ -20,6 +20,8 @@ import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.components.SearchWidgetCreator import org.mozilla.fenix.ext.alreadyOnDestination +import org.mozilla.fenix.home.intent.DeepLinkIntentProcessor.DeepLinkVerifier +import org.mozilla.fenix.settings.SupportUtils /** * Deep links in the form of `fenix://host` open different parts of the app. @@ -33,7 +35,8 @@ class DeepLinkIntentProcessor( private val logger = Logger("DeepLinkIntentProcessor") override fun process(intent: Intent, navController: NavController, out: Intent): Boolean { - val scheme = intent.scheme?.equals(BuildConfig.DEEP_LINK_SCHEME, ignoreCase = true) ?: return false + val scheme = + intent.scheme?.equals(BuildConfig.DEEP_LINK_SCHEME, ignoreCase = true) ?: return false return if (scheme) { intent.data?.let { handleDeepLink(it, navController) } true @@ -89,6 +92,16 @@ class DeepLinkIntentProcessor( if (SDK_INT >= Build.VERSION_CODES.N) { val settingsIntent = Intent(Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS) activity.startActivity(settingsIntent) + } else { + activity.openToBrowserAndLoad( + searchTermOrURL = SupportUtils.getSumoURLForTopic( + activity, + SupportUtils.SumoTopic.SET_AS_DEFAULT_BROWSER + ), + newTab = true, + from = BrowserDirection.FromGlobal, + flags = EngineSession.LoadUrlFlags.external() + ) } } "open" -> {