For #24331 - Support for opening new tabs when requested by service workers
Use the new `ServiceWorkerSupport` AC components for this. Had to be installed in `FenixApplication` since there is a circular dependency between the initialization of the required engine the `tabsUseCases` arguments.
This commit is contained in:
parent
da723ee2fd
commit
6fb54b08f2
|
@ -504,8 +504,9 @@ dependencies {
|
|||
implementation Deps.mozilla_feature_webcompat
|
||||
implementation Deps.mozilla_feature_webnotifications
|
||||
implementation Deps.mozilla_feature_webcompat_reporter
|
||||
implementation Deps.mozilla_service_pocket
|
||||
implementation Deps.mozilla_feature_serviceworker
|
||||
|
||||
implementation Deps.mozilla_service_pocket
|
||||
implementation Deps.mozilla_service_contile
|
||||
implementation Deps.mozilla_service_digitalassetlinks
|
||||
implementation Deps.mozilla_service_sync_autofill
|
||||
|
|
|
@ -36,6 +36,7 @@ import mozilla.components.feature.addons.update.GlobalAddonDependencyProvider
|
|||
import mozilla.components.feature.autofill.AutofillUseCases
|
||||
import mozilla.components.feature.search.ext.buildSearchUrl
|
||||
import mozilla.components.feature.search.ext.waitForSelectedOrDefaultSearchEngine
|
||||
import mozilla.components.feature.serviceworker.ServiceWorkerSupport
|
||||
import mozilla.components.feature.top.sites.TopSitesProviderConfig
|
||||
import mozilla.components.lib.crash.CrashReporter
|
||||
import mozilla.components.service.fxa.manager.SyncEnginesStorage
|
||||
|
@ -200,6 +201,10 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
|||
|
||||
setupLeakCanary()
|
||||
startMetricsIfEnabled()
|
||||
ServiceWorkerSupport.install(
|
||||
components.core.engine,
|
||||
components.useCases.tabsUseCases.addTab
|
||||
)
|
||||
setupPush()
|
||||
|
||||
visibilityLifecycleCallback = VisibilityLifecycleCallback(getSystemService())
|
||||
|
|
|
@ -135,8 +135,9 @@ object Deps {
|
|||
const val mozilla_feature_webcompat = "org.mozilla.components:feature-webcompat:${Versions.mozilla_android_components}"
|
||||
const val mozilla_feature_webnotifications = "org.mozilla.components:feature-webnotifications:${Versions.mozilla_android_components}"
|
||||
const val mozilla_feature_webcompat_reporter = "org.mozilla.components:feature-webcompat-reporter:${Versions.mozilla_android_components}"
|
||||
const val mozilla_service_pocket = "org.mozilla.components:service-pocket:${Versions.mozilla_android_components}"
|
||||
const val mozilla_feature_serviceworker = "org.mozilla.components:feature-serviceworker:${Versions.mozilla_android_components}"
|
||||
|
||||
const val mozilla_service_pocket = "org.mozilla.components:service-pocket:${Versions.mozilla_android_components}"
|
||||
const val mozilla_service_contile =
|
||||
"org.mozilla.components:service-contile:${Versions.mozilla_android_components}"
|
||||
const val mozilla_service_digitalassetlinks =
|
||||
|
|
Loading…
Reference in New Issue