2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/24640 - Remove Event.wrapper for VoiceSearch telemetry

This commit is contained in:
Alexandru2909 2022-04-06 16:04:59 +03:00 committed by mergify[bot]
parent f41a3ffbc3
commit 4e55ea759f
3 changed files with 3 additions and 7 deletions

View File

@ -88,7 +88,6 @@ sealed class Event {
)
}
object AddonsOpenInSettings : Event()
object VoiceSearchTapped : Event()
object SearchWidgetInstalled : Event()
object ProgressiveWebAppOpenFromHomescreenTap : Event()

View File

@ -37,7 +37,6 @@ import org.mozilla.fenix.GleanMetrics.SyncedTabs
import org.mozilla.fenix.GleanMetrics.Tab
import org.mozilla.fenix.GleanMetrics.Tabs
import org.mozilla.fenix.GleanMetrics.TopSites
import org.mozilla.fenix.GleanMetrics.VoiceSearch
import org.mozilla.fenix.GleanMetrics.Wallpapers
import org.mozilla.fenix.GleanMetrics.Messaging
import org.mozilla.fenix.ext.components
@ -269,10 +268,6 @@ private val Event.wrapper: EventWrapper<*>?
{ Addons.openAddonSetting.record(it) },
{ Addons.openAddonSettingKeys.valueOf(it) }
)
is Event.VoiceSearchTapped -> EventWrapper<NoExtraKeys>(
{ VoiceSearch.tapped.record(it) }
)
is Event.AutoPlaySettingVisited -> EventWrapper<NoExtraKeys>(
{ Autoplay.visitedSetting.record(it) }
)

View File

@ -45,6 +45,7 @@ import mozilla.components.concept.storage.HistoryStorage
import mozilla.components.feature.qr.QrFeature
import mozilla.components.lib.state.ext.consumeFlow
import mozilla.components.lib.state.ext.consumeFrom
import mozilla.components.service.glean.private.NoExtras
import mozilla.components.support.base.coroutines.Dispatchers
import mozilla.components.support.base.feature.UserInteractionHandler
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
@ -59,6 +60,7 @@ import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
import mozilla.components.ui.autocomplete.InlineAutocompleteEditText
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.GleanMetrics.VoiceSearch
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
@ -676,7 +678,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
// around such a small edge case, we make the button have no functionality in this case.
if (!isSpeechAvailable()) { return }
requireComponents.analytics.metrics.track(Event.VoiceSearchTapped)
VoiceSearch.tapped.record(NoExtras())
speechIntent.apply {
putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM)
putExtra(RecognizerIntent.EXTRA_PROMPT, requireContext().getString(R.string.voice_search_explainer))