[fenix] Close https://github.com/mozilla-mobile/fenix/issues/26041: Remove un-needed Nimbus workaround

This workaround was temporary and is not needed with the Nimbus groovy
plugin updates in Android Components.
pull/600/head
Jonathan Almeida 2 years ago committed by Jonathan Almeida
parent 40509a528e
commit 4ee1f0ea64

@ -434,15 +434,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
private fun setupNimbusObserver(nimbus: Observable<NimbusInterface.Observer>) {
nimbus.register(object : NimbusInterface.Observer {
override fun onUpdatesApplied(updated: List<EnrolledExperiment>) {
// To workaround a caching bug in Nimbus that appears when we try to query an
// experiment **before** `FxNimbus.initialize` is called we need to set the `api`
// value again so that we can still access the NimbusApi that is wrapped
// in `FxNimbus.initialize.getSdk`.
//
// We set this value here to minimize the race between setting the `api` value and
// the callers of FxNimbus.
// See: https://github.com/mozilla/application-services/issues/5075
FxNimbus.api = components.analytics.experiments
onNimbusStartupAndUpdate()
}
})

Loading…
Cancel
Save