Satisfy linter and hardcode Nimbus off

pull/274/head
Adam Novak 3 years ago
parent 1b87a8b785
commit a210d7529f

@ -83,7 +83,6 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management)
return arguments?.getBoolean(BUNDLE_KEY_INSTALL_EXTERNAL_ADDON_COMPLETE, false) ?: false
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
bindRecyclerView(view)

@ -108,35 +108,8 @@ class Analytics(
}
val experiments: NimbusApi by lazyMonitored {
if (FeatureFlags.nimbusExperiments) {
// Eventually we'll want to use `NimbusDisabled` when we have no NIMBUS_ENDPOINT.
// but we keep this here to not mix feature flags and how we configure Nimbus.
val url: String? = BuildConfig.NIMBUS_ENDPOINT
val serverSettings = if (!url.isNullOrBlank()) {
NimbusServerSettings(url = Uri.parse(url))
} else {
null
}
NimbusEnabled(context, serverSettings).apply {
// Global opt out state is stored in Nimbus, and shouldn't be toggled to `true`
// from the app unless the user does so from a UI control.
// However, the user may have opt-ed out of mako experiments already, so
// we should respect that setting here.
val enabled =
context.components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
context.settings().isExperimentationEnabled
}
if (!enabled) {
globalUserParticipation = enabled
}
// Nimbus should look after downloading experiment definitions from remote settings
// on another thread, and making sure we don't hit the server each time we start.
updateExperiments()
}
} else {
NimbusDisabled()
}
// No experiments for Iceraven
return NimbusDisabled()
}
}

Loading…
Cancel
Save