From deb08fe581243678677450226fe3936ac9c862f7 Mon Sep 17 00:00:00 2001 From: Alexandru2909 Date: Thu, 5 Jan 2023 17:06:14 +0200 Subject: [PATCH] [fenix] Bug 1808665 - Record toolbar_menu_visible event --- .../org/mozilla/fenix/components/metrics/MetricController.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt index 6b1f949947..b9cddaa537 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt @@ -6,6 +6,7 @@ package org.mozilla.fenix.components.metrics import androidx.annotation.VisibleForTesting import mozilla.components.browser.menu.facts.BrowserMenuFacts +import mozilla.components.browser.toolbar.facts.ToolbarFacts import mozilla.components.concept.awesomebar.AwesomeBar import mozilla.components.feature.autofill.facts.AutofillFacts import mozilla.components.feature.awesomebar.facts.AwesomeBarFacts @@ -42,6 +43,7 @@ import org.mozilla.fenix.GleanMetrics.BrowserSearch import org.mozilla.fenix.GleanMetrics.ContextMenu import org.mozilla.fenix.GleanMetrics.ContextualMenu import org.mozilla.fenix.GleanMetrics.CreditCards +import org.mozilla.fenix.GleanMetrics.Events import org.mozilla.fenix.GleanMetrics.LoginDialog import org.mozilla.fenix.GleanMetrics.MediaNotification import org.mozilla.fenix.GleanMetrics.MediaState @@ -147,6 +149,9 @@ internal class ReleaseMetricController( else -> Unit } } + Component.BROWSER_TOOLBAR to ToolbarFacts.Items.MENU -> { + Events.toolbarMenuVisible.record(NoExtras()) + } Component.FEATURE_CONTEXTMENU to ContextMenuFacts.Items.ITEM -> { metadata?.get("item")?.let { item -> contextMenuAllowList[item]?.let { extraKey ->