Loading app/metrics.yaml +13 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,19 @@ events: notification_emails: - android-probes@mozilla.com expires: "2021-10-01" default_browser_notif_tapped: type: event description: | User tapped on the default browser notification bugs: - https://github.com/mozilla-mobile/fenix/issues/19847 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/20311 data_sensitivity: - interaction notification_emails: - android-probes@mozilla.com expires: "2022-08-01" toolbar_menu_visible: type: event description: | Loading app/src/main/java/org/mozilla/fenix/HomeActivity.kt +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { StartSearchIntentProcessor(components.analytics.metrics), OpenBrowserIntentProcessor(this, ::getIntentSessionId), OpenSpecificTabIntentProcessor(this), DefaultBrowserIntentProcessor(this) DefaultBrowserIntentProcessor(this, components.analytics.metrics) ) } Loading app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt +1 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ sealed class Event { object OnboardingPrivateBrowsing : Event() object OnboardingFinish : Event() object ChangedToDefaultBrowser : Event() object DefaultBrowserNotifTapped : Event() object LoginDialogPromptDisplayed : Event() object LoginDialogPromptCancelled : Event() Loading app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +3 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,9 @@ private val Event.wrapper: EventWrapper<*>? is Event.ChangedToDefaultBrowser -> EventWrapper<NoExtraKeys>( { Events.defaultBrowserChanged.record(it) } ) is Event.DefaultBrowserNotifTapped -> EventWrapper<NoExtraKeys>( { Events.defaultBrowserNotifTapped.record(it) } ) is Event.OpenedBookmark -> EventWrapper<NoExtraKeys>( { BookmarksManagement.open.record(it) } ) Loading app/src/main/java/org/mozilla/fenix/home/intent/DefaultBrowserIntentProcessor.kt +5 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ package org.mozilla.fenix.home.intent import android.content.Intent import androidx.navigation.NavController import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.components.metrics.Event import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.ext.openSetDefaultBrowserOption import org.mozilla.fenix.ext.settings import org.mozilla.fenix.onboarding.DefaultBrowserNotificationWorker.Companion.isDefaultBrowserNotificationIntent Loading @@ -18,13 +20,14 @@ import org.mozilla.fenix.onboarding.DefaultBrowserNotificationWorker.Companion.i * notification, [settings.shouldShowDefaultBrowserNotification] will return false */ class DefaultBrowserIntentProcessor( private val activity: HomeActivity private val activity: HomeActivity, private val metrics: MetricController ) : HomeIntentProcessor { override fun process(intent: Intent, navController: NavController, out: Intent): Boolean { return if (isDefaultBrowserNotificationIntent(intent)) { activity.openSetDefaultBrowserOption() metrics.track(Event.DefaultBrowserNotifTapped) true } else { false Loading Loading
app/metrics.yaml +13 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,19 @@ events: notification_emails: - android-probes@mozilla.com expires: "2021-10-01" default_browser_notif_tapped: type: event description: | User tapped on the default browser notification bugs: - https://github.com/mozilla-mobile/fenix/issues/19847 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/20311 data_sensitivity: - interaction notification_emails: - android-probes@mozilla.com expires: "2022-08-01" toolbar_menu_visible: type: event description: | Loading
app/src/main/java/org/mozilla/fenix/HomeActivity.kt +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { StartSearchIntentProcessor(components.analytics.metrics), OpenBrowserIntentProcessor(this, ::getIntentSessionId), OpenSpecificTabIntentProcessor(this), DefaultBrowserIntentProcessor(this) DefaultBrowserIntentProcessor(this, components.analytics.metrics) ) } Loading
app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt +1 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ sealed class Event { object OnboardingPrivateBrowsing : Event() object OnboardingFinish : Event() object ChangedToDefaultBrowser : Event() object DefaultBrowserNotifTapped : Event() object LoginDialogPromptDisplayed : Event() object LoginDialogPromptCancelled : Event() Loading
app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +3 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,9 @@ private val Event.wrapper: EventWrapper<*>? is Event.ChangedToDefaultBrowser -> EventWrapper<NoExtraKeys>( { Events.defaultBrowserChanged.record(it) } ) is Event.DefaultBrowserNotifTapped -> EventWrapper<NoExtraKeys>( { Events.defaultBrowserNotifTapped.record(it) } ) is Event.OpenedBookmark -> EventWrapper<NoExtraKeys>( { BookmarksManagement.open.record(it) } ) Loading
app/src/main/java/org/mozilla/fenix/home/intent/DefaultBrowserIntentProcessor.kt +5 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ package org.mozilla.fenix.home.intent import android.content.Intent import androidx.navigation.NavController import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.components.metrics.Event import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.ext.openSetDefaultBrowserOption import org.mozilla.fenix.ext.settings import org.mozilla.fenix.onboarding.DefaultBrowserNotificationWorker.Companion.isDefaultBrowserNotificationIntent Loading @@ -18,13 +20,14 @@ import org.mozilla.fenix.onboarding.DefaultBrowserNotificationWorker.Companion.i * notification, [settings.shouldShowDefaultBrowserNotification] will return false */ class DefaultBrowserIntentProcessor( private val activity: HomeActivity private val activity: HomeActivity, private val metrics: MetricController ) : HomeIntentProcessor { override fun process(intent: Intent, navController: NavController, out: Intent): Boolean { return if (isDefaultBrowserNotificationIntent(intent)) { activity.openSetDefaultBrowserOption() metrics.track(Event.DefaultBrowserNotifTapped) true } else { false Loading