|
|
|
@ -1,35 +1,36 @@
|
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
|
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.launch
|
|
|
|
|
import kotlinx.coroutines.runBlocking
|
|
|
|
|
import mozilla.components.service.glean.BuildConfig
|
|
|
|
|
import mozilla.components.service.glean.Glean
|
|
|
|
|
import mozilla.components.service.glean.config.Configuration
|
|
|
|
|
import mozilla.components.service.glean.private.NoExtraKeys
|
|
|
|
|
import mozilla.components.support.utils.Browsers
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.BookmarksManagement
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.ContextMenu
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.CrashReporter
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.CustomTab
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.ErrorPage
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.Events
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.FindInPage
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.Library
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.Metrics
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.Pings
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.QrScanner
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.QuickActionSheet
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine
|
|
|
|
|
import org.mozilla.fenix.ext.components
|
|
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
|
|
import kotlinx.coroutines.Job
|
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
|
|
import kotlinx.coroutines.runBlocking
|
|
|
|
|
import mozilla.components.service.glean.BuildConfig
|
|
|
|
|
import mozilla.components.service.glean.config.Configuration
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.QrScanner
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.Library
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.ErrorPage
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.SyncAccount
|
|
|
|
|
import org.mozilla.fenix.GleanMetrics.SyncAuth
|
|
|
|
|
import org.mozilla.fenix.ext.components
|
|
|
|
|
|
|
|
|
|
private class EventWrapper<T : Enum<T>>(
|
|
|
|
|
private val recorder: ((Map<T, String>?) -> Unit),
|
|
|
|
|