diff --git a/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt b/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt index 429ff9eb03..2b70d55517 100644 --- a/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt @@ -4,7 +4,11 @@ package org.mozilla.fenix.customtabs +import android.app.assist.AssistContent import android.content.Intent +import android.net.Uri +import android.os.Build +import androidx.annotation.RequiresApi import androidx.annotation.VisibleForTesting import androidx.navigation.NavDestination import androidx.navigation.NavDirections @@ -117,4 +121,11 @@ open class ExternalAppBrowserActivity : HomeActivity() { internal fun getExternalTabId(): String? { return getIntentSessionId(SafeIntent(intent)) } + + @RequiresApi(Build.VERSION_CODES.M) + override fun onProvideAssistContent(outContent: AssistContent?) { + super.onProvideAssistContent(outContent) + val currentTabUrl = getExternalTab()?.content?.url + outContent?.webUri = currentTabUrl?.let { Uri.parse(it) } + } }