From a5110f8c0aaf8c27919d63884ee3b5d852eec71a Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 3 Jun 2021 11:35:05 -0400 Subject: [PATCH] For #19746 - Remove FeatureFlags.nimbusExperiments (#19771) --- .../main/java/org/mozilla/fenix/FeatureFlags.kt | 5 ----- .../org/mozilla/fenix/components/Analytics.kt | 15 +++++---------- .../mozilla/fenix/settings/DataChoicesFragment.kt | 2 -- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt index e61457462a..25125bc0f3 100644 --- a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt +++ b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt @@ -14,11 +14,6 @@ object FeatureFlags { */ val pullToRefreshEnabled = Config.channel.isNightlyOrDebug - /** - * Enables the Nimbus experiments library. - */ - const val nimbusExperiments = true - /** * Enables the Addresses autofill feature. */ diff --git a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt index d875dd63d8..af365fd00c 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt @@ -14,10 +14,8 @@ import mozilla.components.lib.crash.service.GleanCrashReporterService import mozilla.components.lib.crash.service.MozillaSocorroService import mozilla.components.lib.crash.service.SentryService import mozilla.components.service.nimbus.NimbusApi -import mozilla.components.service.nimbus.NimbusDisabled import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.Config -import org.mozilla.fenix.FeatureFlags import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R import org.mozilla.fenix.ReleaseChannel @@ -25,7 +23,6 @@ import org.mozilla.fenix.components.metrics.AdjustMetricsService import org.mozilla.fenix.components.metrics.GleanMetricsService import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.experiments.createNimbus -import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.settings import org.mozilla.fenix.perf.lazyMonitored import org.mozilla.fenix.utils.Mockable @@ -59,9 +56,11 @@ class Analytics( // The name "Fenix" here matches the product name on Socorro and is unrelated to the actual app name: // https://bugzilla.mozilla.org/show_bug.cgi?id=1523284 - val socorroService = MozillaSocorroService(context, appName = "Fenix", + val socorroService = MozillaSocorroService( + context, appName = "Fenix", version = MOZ_APP_VERSION, buildId = MOZ_APP_BUILDID, vendor = MOZ_APP_VENDOR, - releaseChannel = MOZ_UPDATE_CHANNEL) + releaseChannel = MOZ_UPDATE_CHANNEL + ) services.add(socorroService) val intent = Intent(context, HomeActivity::class.java).apply { @@ -102,11 +101,7 @@ class Analytics( } val experiments: NimbusApi by lazyMonitored { - if (FeatureFlags.nimbusExperiments) { - createNimbus(context, BuildConfig.NIMBUS_ENDPOINT) - } else { - NimbusDisabled() - } + createNimbus(context, BuildConfig.NIMBUS_ENDPOINT) } } diff --git a/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt index eb0c113326..ceb6b2ab6a 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt @@ -7,7 +7,6 @@ package org.mozilla.fenix.settings import android.os.Bundle import androidx.preference.PreferenceFragmentCompat import androidx.preference.SwitchPreference -import org.mozilla.fenix.FeatureFlags import org.mozilla.fenix.R import org.mozilla.fenix.components.metrics.MetricServiceType import org.mozilla.fenix.ext.components @@ -72,7 +71,6 @@ class DataChoicesFragment : PreferenceFragmentCompat() { requirePreference(R.string.pref_key_experimentation).apply { isChecked = context.settings().isExperimentationEnabled - isVisible = FeatureFlags.nimbusExperiments onPreferenceChangeListener = SharedPreferenceUpdater() } }