mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Integrate service-experiments component (#4098)
This commit is contained in:
parent
a526e0fad3
commit
51218bc93e
@ -332,6 +332,7 @@ dependencies {
|
||||
implementation Deps.mozilla_service_firefox_accounts
|
||||
implementation Deps.mozilla_service_fretboard
|
||||
implementation Deps.mozilla_service_glean
|
||||
implementation Deps.mozilla_service_experiments
|
||||
|
||||
implementation Deps.mozilla_support_ktx
|
||||
implementation Deps.mozilla_support_rustlog
|
||||
|
@ -18,6 +18,7 @@ import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import mozilla.appservices.Megazord
|
||||
import mozilla.components.concept.push.PushProcessor
|
||||
import mozilla.components.service.experiments.Experiments
|
||||
import mozilla.components.service.fretboard.Fretboard
|
||||
import mozilla.components.service.fretboard.source.kinto.KintoExperimentSource
|
||||
import mozilla.components.service.fretboard.storage.flatfile.FlatFileExperimentStorage
|
||||
@ -71,6 +72,14 @@ open class FenixApplication : Application() {
|
||||
// on the main process, as it uses Gecko to fetch experiments from the server.
|
||||
experimentLoader = loadExperiments()
|
||||
|
||||
// Enable the service-experiments component
|
||||
Experiments.initialize(
|
||||
applicationContext,
|
||||
mozilla.components.service.experiments.Configuration(
|
||||
httpClient = lazy(LazyThreadSafetyMode.NONE) { components.core.client }
|
||||
)
|
||||
)
|
||||
|
||||
setupLeakCanary()
|
||||
if (Settings.getInstance(this).isTelemetryEnabled) {
|
||||
components.analytics.metrics.start()
|
||||
|
@ -128,6 +128,7 @@ object Deps {
|
||||
const val mozilla_service_firefox_accounts = "org.mozilla.components:service-firefox-accounts:${Versions.mozilla_android_components}"
|
||||
const val mozilla_service_fretboard = "org.mozilla.components:service-fretboard:${Versions.mozilla_android_components}"
|
||||
const val mozilla_service_glean = "org.mozilla.components:service-glean:${Versions.mozilla_android_components}"
|
||||
const val mozilla_service_experiments = "org.mozilla.components:service-experiments:${Versions.mozilla_android_components}"
|
||||
|
||||
const val mozilla_ui_colors = "org.mozilla.components:ui-colors:${Versions.mozilla_android_components}"
|
||||
const val mozilla_ui_icons = "org.mozilla.components:ui-icons:${Versions.mozilla_android_components}"
|
||||
|
Loading…
Reference in New Issue
Block a user