For #24593 - Initialize Glean on all builds. Avoid Fennec check.

This completes the work for removing the Fennec migration support.
Before that, for Fenix release and beta, apps to which users might update to
from old Fennec builds the Glean initialization was done separately in
MigratingFenixApplication to allow time to first migrate user's telemetry
setting.
With the removal of the migration support it is now safe to initialize Glean in
the same way for all builds and remove that Fennec check.
pull/543/head
Mugurell 2 years ago committed by mergify[bot]
parent 6136748e36
commit 526b9a17d7

@ -41,18 +41,6 @@ enum class ReleaseChannel {
val isNightlyOrDebug: Boolean
get() = this == Debug || this == Nightly
/**
* Is this a build for a release channel that we used to ship Fennec on?
*/
val isFennec: Boolean
get() = this in fennecChannels
/**
* Is this build for a "pure" Fenix channel that we never shipped Fennec on?
*/
val isFenix: Boolean
get() = !isFennec
/**
* Is this a "Mozilla Online" build of Fenix? "Mozilla Online" is the Chinese branch of Mozilla
* and this flag will be `true` for builds shipping to Chinese app stores.
@ -72,8 +60,3 @@ object Config {
}
}
}
private val fennecChannels: List<ReleaseChannel> = listOf(
ReleaseChannel.Beta,
ReleaseChannel.Release
)

@ -123,13 +123,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
return
}
if (Config.channel.isFenix) {
// We need to always initialize Glean and do it early here.
// Note that we are only initializing Glean here for "fenix" builds. "fennec" builds
// will initialize in MigratingFenixApplication because we first need to migrate the
// user's choice from Fennec.
initializeGlean()
}
// We need to always initialize Glean and do it early here.
initializeGlean()
setupInMainProcessOnly()
@ -142,7 +137,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
protected open fun initializeGlean() {
val telemetryEnabled = settings().isTelemetryEnabled
logger.debug("Initializing Glean (uploadEnabled=$telemetryEnabled, isFennec=${Config.channel.isFennec})")
logger.debug("Initializing Glean (uploadEnabled=$telemetryEnabled})")
Glean.initialize(
applicationContext = this,

Loading…
Cancel
Save