mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] No issue: extract startMetricsIfEnabled function.
This refactor, done entirely by IDE, is a no-op clean-up of this file.
This commit is contained in:
parent
b2d6f5746b
commit
1f65ba446e
@ -139,14 +139,7 @@ open class FenixApplication : LocaleAwareApplication() {
|
|||||||
|
|
||||||
prefetchForHomeFragment()
|
prefetchForHomeFragment()
|
||||||
setupLeakCanary()
|
setupLeakCanary()
|
||||||
if (settings().isTelemetryEnabled) {
|
startMetricsIfEnabled()
|
||||||
components.analytics.metrics.start(MetricServiceType.Data)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (settings().isMarketingTelemetryEnabled) {
|
|
||||||
components.analytics.metrics.start(MetricServiceType.Marketing)
|
|
||||||
}
|
|
||||||
|
|
||||||
setupPush()
|
setupPush()
|
||||||
|
|
||||||
visibilityLifecycleCallback = VisibilityLifecycleCallback(getSystemService())
|
visibilityLifecycleCallback = VisibilityLifecycleCallback(getSystemService())
|
||||||
@ -203,6 +196,16 @@ open class FenixApplication : LocaleAwareApplication() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun startMetricsIfEnabled() {
|
||||||
|
if (settings().isTelemetryEnabled) {
|
||||||
|
components.analytics.metrics.start(MetricServiceType.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings().isMarketingTelemetryEnabled) {
|
||||||
|
components.analytics.metrics.start(MetricServiceType.Marketing)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// See https://github.com/mozilla-mobile/fenix/issues/7227 for context.
|
// See https://github.com/mozilla-mobile/fenix/issues/7227 for context.
|
||||||
// To re-enable this, we need to do so in a way that won't interfere with any startup operations
|
// To re-enable this, we need to do so in a way that won't interfere with any startup operations
|
||||||
// which acquire reserved+ sqlite lock. Currently, Fennec migrations need to write to storage
|
// which acquire reserved+ sqlite lock. Currently, Fennec migrations need to write to storage
|
||||||
|
Loading…
Reference in New Issue
Block a user