Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gaba
fenix
Commits
169071ac
Commit
169071ac
authored
Jul 21, 2020
by
Michael Comella
Committed by
Michael Comella
Jul 21, 2020
Browse files
No issue: extract startMetricsIfEnabled function.
This refactor, done entirely by IDE, is a no-op clean-up of this file.
parent
11e2137f
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/FenixApplication.kt
View file @
169071ac
...
...
@@ -139,14 +139,7 @@ open class FenixApplication : LocaleAwareApplication() {
prefetchForHomeFragment
()
setupLeakCanary
()
if
(
settings
().
isTelemetryEnabled
)
{
components
.
analytics
.
metrics
.
start
(
MetricServiceType
.
Data
)
}
if
(
settings
().
isMarketingTelemetryEnabled
)
{
components
.
analytics
.
metrics
.
start
(
MetricServiceType
.
Marketing
)
}
startMetricsIfEnabled
()
setupPush
()
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.
// 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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment