1
0
Fork 0

1581556: Initialize Glean on the main thread

master
Michael Droettboom 2019-09-20 13:30:02 -04:00 committed by Emily Kager
parent 47064a68e0
commit a63eaa9d67
1 changed files with 2 additions and 3 deletions

View File

@ -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))