parent
3b866d4da4
commit
477493e197
|
@ -137,6 +137,7 @@ events:
|
||||||
show_search_shortcuts, open_links_in_a_private_tab (bug in
|
show_search_shortcuts, open_links_in_a_private_tab (bug in
|
||||||
implementation https://github.com/mozilla-mobile/fenix/issues/7384),
|
implementation https://github.com/mozilla-mobile/fenix/issues/7384),
|
||||||
pref_key_sync_logins, pref_key_sync_bookmarks, pref_key_sync_history,
|
pref_key_sync_logins, pref_key_sync_bookmarks, pref_key_sync_history,
|
||||||
|
pref_key_show_voice_search,
|
||||||
and pref_key_show_search_suggestions_in_private.
|
and pref_key_show_search_suggestions_in_private.
|
||||||
enabled:
|
enabled:
|
||||||
description: "Whether or not the preference is *now* enabled"
|
description: "Whether or not the preference is *now* enabled"
|
||||||
|
@ -1826,6 +1827,19 @@ search_suggestions:
|
||||||
- fenix-core@mozilla.com
|
- fenix-core@mozilla.com
|
||||||
expires: "2020-09-01"
|
expires: "2020-09-01"
|
||||||
|
|
||||||
|
voice_search:
|
||||||
|
tapped:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
A user selected the voice search button on the search screen.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10465
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/10785
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
|
||||||
top_sites:
|
top_sites:
|
||||||
open_in_new_tab:
|
open_in_new_tab:
|
||||||
type: event
|
type: event
|
||||||
|
|
|
@ -44,6 +44,7 @@ import org.mozilla.fenix.GleanMetrics.ToolbarSettings
|
||||||
import org.mozilla.fenix.GleanMetrics.TopSites
|
import org.mozilla.fenix.GleanMetrics.TopSites
|
||||||
import org.mozilla.fenix.GleanMetrics.TrackingProtection
|
import org.mozilla.fenix.GleanMetrics.TrackingProtection
|
||||||
import org.mozilla.fenix.GleanMetrics.UserSpecifiedSearchEngines
|
import org.mozilla.fenix.GleanMetrics.UserSpecifiedSearchEngines
|
||||||
|
import org.mozilla.fenix.GleanMetrics.VoiceSearch
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.utils.BrowsersCache
|
import org.mozilla.fenix.utils.BrowsersCache
|
||||||
|
@ -522,6 +523,9 @@ private val Event.wrapper: EventWrapper<*>?
|
||||||
{ Tip.closed.record(it) },
|
{ Tip.closed.record(it) },
|
||||||
{ Tip.closedKeys.valueOf(it) }
|
{ Tip.closedKeys.valueOf(it) }
|
||||||
)
|
)
|
||||||
|
is Event.VoiceSearchTapped -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ VoiceSearch.tapped.record(it) }
|
||||||
|
)
|
||||||
// Don't record other events in Glean:
|
// Don't record other events in Glean:
|
||||||
is Event.AddBookmark -> null
|
is Event.AddBookmark -> null
|
||||||
is Event.OpenedBookmark -> null
|
is Event.OpenedBookmark -> null
|
||||||
|
|
|
@ -13,9 +13,9 @@ import mozilla.components.browser.toolbar.facts.ToolbarFacts
|
||||||
import mozilla.components.concept.awesomebar.AwesomeBar
|
import mozilla.components.concept.awesomebar.AwesomeBar
|
||||||
import mozilla.components.feature.awesomebar.provider.BookmarksStorageSuggestionProvider
|
import mozilla.components.feature.awesomebar.provider.BookmarksStorageSuggestionProvider
|
||||||
import mozilla.components.feature.awesomebar.provider.ClipboardSuggestionProvider
|
import mozilla.components.feature.awesomebar.provider.ClipboardSuggestionProvider
|
||||||
|
import mozilla.components.feature.awesomebar.provider.HistoryStorageSuggestionProvider
|
||||||
import mozilla.components.feature.awesomebar.provider.SearchSuggestionProvider
|
import mozilla.components.feature.awesomebar.provider.SearchSuggestionProvider
|
||||||
import mozilla.components.feature.awesomebar.provider.SessionSuggestionProvider
|
import mozilla.components.feature.awesomebar.provider.SessionSuggestionProvider
|
||||||
import mozilla.components.feature.awesomebar.provider.HistoryStorageSuggestionProvider
|
|
||||||
import mozilla.components.feature.contextmenu.facts.ContextMenuFacts
|
import mozilla.components.feature.contextmenu.facts.ContextMenuFacts
|
||||||
import mozilla.components.feature.customtabs.CustomTabsFacts
|
import mozilla.components.feature.customtabs.CustomTabsFacts
|
||||||
import mozilla.components.feature.downloads.facts.DownloadsFacts
|
import mozilla.components.feature.downloads.facts.DownloadsFacts
|
||||||
|
@ -166,6 +166,7 @@ sealed class Event {
|
||||||
object FennecToFenixMigrated : Event()
|
object FennecToFenixMigrated : Event()
|
||||||
object AddonsOpenInSettings : Event()
|
object AddonsOpenInSettings : Event()
|
||||||
object AddonsOpenInToolbarMenu : Event()
|
object AddonsOpenInToolbarMenu : Event()
|
||||||
|
object VoiceSearchTapped : Event()
|
||||||
|
|
||||||
// Interaction events with extras
|
// Interaction events with extras
|
||||||
|
|
||||||
|
@ -187,6 +188,7 @@ sealed class Event {
|
||||||
context.getString(R.string.pref_key_sync_logins),
|
context.getString(R.string.pref_key_sync_logins),
|
||||||
context.getString(R.string.pref_key_sync_bookmarks),
|
context.getString(R.string.pref_key_sync_bookmarks),
|
||||||
context.getString(R.string.pref_key_sync_history),
|
context.getString(R.string.pref_key_sync_history),
|
||||||
|
context.getString(R.string.pref_key_show_voice_search),
|
||||||
context.getString(R.string.pref_key_show_search_suggestions_in_private)
|
context.getString(R.string.pref_key_show_search_suggestions_in_private)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun launchVoiceSearch() {
|
private fun launchVoiceSearch() {
|
||||||
|
requireComponents.analytics.metrics.track(Event.VoiceSearchTapped)
|
||||||
val speechIntent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply {
|
val speechIntent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply {
|
||||||
putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM)
|
putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM)
|
||||||
putExtra(RecognizerIntent.EXTRA_PROMPT, requireContext().getString(R.string.voice_search_explainer))
|
putExtra(RecognizerIntent.EXTRA_PROMPT, requireContext().getString(R.string.voice_search_explainer))
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue