diff --git a/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt b/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt index 5982bd309..731f00c9c 100644 --- a/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt +++ b/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt @@ -40,10 +40,9 @@ object GeckoProvider { .debugLogging(Config.channel.isDebug) .build() - Experiments.withExperiment("webrender-performance-comparison-experiment") { - branchName -> + Experiments.withExperiment("webrender-performance-comparison-experiment") { branchName -> if (branchName == "disable_webrender") { - runtimeSettings.extras.putInt("forcedisablewebrender", 1) + runtimeSettings.extras.putInt("forcedisablewebrender", 1) } } diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index 04a83634b..5b9cf5c00 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -82,6 +82,16 @@ open class FenixApplication : LocaleAwareApplication() { setDayNightTheme() enableStrictMode() + // Enable the service-experiments component + if (settings().isExperimentationEnabled && Config.channel.isReleaseOrBeta) { + Experiments.initialize( + applicationContext, + mozilla.components.service.experiments.Configuration( + httpClient = lazy(LazyThreadSafetyMode.NONE) { components.core.client } + ) + ) + } + // Make sure the engine is initialized and ready to use. components.core.engine.warmUp() @@ -97,16 +107,6 @@ open class FenixApplication : LocaleAwareApplication() { // on the main process, as it uses Gecko to fetch experiments from the server. experimentLoader = loadExperiments() - // Enable the service-experiments component - if (settings().isExperimentationEnabled && Config.channel.isReleaseOrBeta) { - Experiments.initialize( - applicationContext, - mozilla.components.service.experiments.Configuration( - httpClient = lazy(LazyThreadSafetyMode.NONE) { components.core.client } - ) - ) - } - // When the `fenix-test-2019-08-05` experiment is active, record its branch in Glean // telemetry. This will be used to validate that the experiment system correctly enrolls // clients and segments them into branches. Note that this will not take effect the first