* For #8412: Passes error handling function to 'CustomTabWindowFeature' Change required for showing error message when the app can't handle a specific scheme. Implemented in AC: https://github.com/mozilla-mobile/android-components/pull/6122 * Upgrade AC version Co-authored-by: Sawyer Blatz <sdblatz@gmail.com>master
parent
f76acc5db1
commit
cee34893ed
|
@ -33,6 +33,7 @@ import org.mozilla.fenix.R
|
|||
import org.mozilla.fenix.browser.BaseBrowserFragment
|
||||
import org.mozilla.fenix.browser.CustomTabContextMenuCandidate
|
||||
import org.mozilla.fenix.browser.FenixSnackbarDelegate
|
||||
import org.mozilla.fenix.components.FenixSnackbar
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.ext.nav
|
||||
import org.mozilla.fenix.ext.requireComponents
|
||||
|
@ -50,7 +51,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), UserInteractionHandler
|
|||
private val windowFeature = ViewBoundFeatureWrapper<CustomTabWindowFeature>()
|
||||
private val hideToolbarFeature = ViewBoundFeatureWrapper<WebAppHideToolbarFeature>()
|
||||
|
||||
@Suppress("LongMethod")
|
||||
@Suppress("LongMethod", "ComplexMethod")
|
||||
override fun initializeUI(view: View): Session? {
|
||||
return super.initializeUI(view)?.also {
|
||||
val activity = requireActivity()
|
||||
|
@ -82,7 +83,13 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), UserInteractionHandler
|
|||
activity,
|
||||
components.core.store,
|
||||
customTabSessionId
|
||||
),
|
||||
) { exception ->
|
||||
components.analytics.crashReporter.submitCaughtException(exception)
|
||||
FenixSnackbar.make(view.swipeRefresh, FenixSnackbar.LENGTH_LONG).apply {
|
||||
setText(resources.getString(R.string.unknown_scheme_error_message))
|
||||
setAppropriateBackground(true)
|
||||
}.show()
|
||||
},
|
||||
owner = this,
|
||||
view = view
|
||||
)
|
||||
|
|
|
@ -113,6 +113,9 @@
|
|||
<string name="browser_menu_open_app_link">Open in app</string>
|
||||
<!-- Browser menu button to configure reader mode appearance e.g. the used font type and size -->
|
||||
<string name="browser_menu_read_appearance">Appearance</string>
|
||||
<!-- Error message to show when the user tries to access a scheme not
|
||||
handled by the app (Ex: blob, tel etc) -->
|
||||
<string name="unknown_scheme_error_message">Unable to connect. Unrecognizable URL scheme.</string>
|
||||
|
||||
<!-- Locale Settings Fragment -->
|
||||
<!-- Content description for tick mark on selected language -->
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
object AndroidComponents {
|
||||
const val VERSION = "38.0.20200329190103"
|
||||
const val VERSION = "38.0.20200331130030"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue