[fenix] 1581556: Initialize Glean on the main thread

pull/600/head
Michael Droettboom 5 years ago committed by Emily Kager
parent a0ee433397
commit 5a9020df8b

@ -5,9 +5,8 @@
package org.mozilla.fenix.components.metrics
import android.content.Context
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import mozilla.components.service.glean.BuildConfig
@ -397,7 +396,7 @@ class GleanMetricsService(private val context: Context) : MetricsService {
if (initialized) return
initialized = true
starter = CoroutineScope(Dispatchers.IO).launch {
starter = MainScope().launch {
Glean.registerPings(Pings)
Glean.initialize(context, Configuration(channel = BuildConfig.BUILD_TYPE))

Loading…
Cancel
Save