Loading app/metrics.yaml +44 −0 Original line number Diff line number Diff line Loading @@ -1044,6 +1044,50 @@ history: - fenix-core@mozilla.com expires: "2020-09-01" tip: displayed: type: event description: > The tip was displayed extra_keys: identifier: description: "The identifier of the tip displayed" bugs: - https://github.com/mozilla-mobile/fenix/issues/9328 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/9836 notification_emails: - fenix-core@mozilla.com expires: "2020-09-01" pressed: type: event description: > The tip's button was pressed extra_keys: identifier: description: "The identifier of the tip the action was taken on" bugs: - https://github.com/mozilla-mobile/fenix/issues/9328 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/9836 notification_emails: - fenix-core@mozilla.com expires: "2020-09-01" closed: type: event description: > The tip was closed extra_keys: identifier: description: "The identifier of the tip closed" bugs: - https://github.com/mozilla-mobile/fenix/issues/9328 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/9836 notification_emails: - fenix-core@mozilla.com expires: "2020-09-01" reader_mode: available: type: event Loading app/src/main/java/org/mozilla/fenix/FeatureFlags.kt +5 −0 Original line number Diff line number Diff line Loading @@ -43,4 +43,9 @@ object FeatureFlags { * Enables picture-in-picture feature */ val pictureInPicture = Config.channel.isNightlyOrDebug /** * Enables tip feature */ val tips = Config.channel.isDebug } app/src/main/java/org/mozilla/fenix/components/Components.kt +3 −3 Original line number Diff line number Diff line Loading @@ -10,16 +10,16 @@ import android.content.Intent import androidx.core.net.toUri import mozilla.components.feature.addons.AddonManager import mozilla.components.feature.addons.amo.AddonCollectionProvider import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker import mozilla.components.feature.addons.migration.SupportedAddonsChecker import mozilla.components.feature.addons.update.AddonUpdater import mozilla.components.feature.addons.update.DefaultAddonUpdater import mozilla.components.feature.addons.migration.SupportedAddonsChecker import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker import mozilla.components.lib.publicsuffixlist.PublicSuffixList import mozilla.components.support.migration.state.MigrationStore import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.utils.Mockable import org.mozilla.fenix.utils.ClipboardHandler import org.mozilla.fenix.utils.Mockable import org.mozilla.fenix.wifi.WifiConnectionMonitor import java.util.concurrent.TimeUnit Loading app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +13 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import org.mozilla.fenix.GleanMetrics.SearchWidget import org.mozilla.fenix.GleanMetrics.SyncAccount import org.mozilla.fenix.GleanMetrics.SyncAuth import org.mozilla.fenix.GleanMetrics.Tab import org.mozilla.fenix.GleanMetrics.Tip import org.mozilla.fenix.GleanMetrics.ToolbarSettings import org.mozilla.fenix.GleanMetrics.TopSites import org.mozilla.fenix.GleanMetrics.TrackingProtection Loading Loading @@ -498,6 +499,18 @@ private val Event.wrapper: EventWrapper<*>? is Event.AddonsOpenInToolbarMenu -> EventWrapper<NoExtraKeys>( { Addons.openAddonInToolbarMenu.record(it) } ) is Event.TipDisplayed -> EventWrapper( { Tip.displayed.record(it) }, { Tip.displayedKeys.valueOf(it) } ) is Event.TipPressed -> EventWrapper( { Tip.pressed.record(it) }, { Tip.pressedKeys.valueOf(it) } ) is Event.TipClosed -> EventWrapper( { Tip.closed.record(it) }, { Tip.closedKeys.valueOf(it) } ) // Don't record other events in Glean: is Event.AddBookmark -> null is Event.OpenedBookmark -> null Loading app/src/main/java/org/mozilla/fenix/components/metrics/Metrics.kt +16 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import org.mozilla.fenix.GleanMetrics.Events import org.mozilla.fenix.GleanMetrics.Library import org.mozilla.fenix.GleanMetrics.Logins import org.mozilla.fenix.GleanMetrics.SearchShortcuts import org.mozilla.fenix.GleanMetrics.Tip import org.mozilla.fenix.GleanMetrics.ToolbarSettings import org.mozilla.fenix.GleanMetrics.TrackingProtection import org.mozilla.fenix.R Loading Loading @@ -193,6 +194,21 @@ sealed class Event { } } data class TipDisplayed(val identifier: String) : Event() { override val extras: Map<Tip.displayedKeys, String>? get() = hashMapOf(Tip.displayedKeys.identifier to identifier) } data class TipPressed(val identifier: String) : Event() { override val extras: Map<Tip.pressedKeys, String>? get() = hashMapOf(Tip.pressedKeys.identifier to identifier) } data class TipClosed(val identifier: String) : Event() { override val extras: Map<Tip.closedKeys, String>? get() = hashMapOf(Tip.closedKeys.identifier to identifier) } data class ToolbarPositionChanged(val position: Position) : Event() { enum class Position { TOP, BOTTOM } Loading Loading
app/metrics.yaml +44 −0 Original line number Diff line number Diff line Loading @@ -1044,6 +1044,50 @@ history: - fenix-core@mozilla.com expires: "2020-09-01" tip: displayed: type: event description: > The tip was displayed extra_keys: identifier: description: "The identifier of the tip displayed" bugs: - https://github.com/mozilla-mobile/fenix/issues/9328 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/9836 notification_emails: - fenix-core@mozilla.com expires: "2020-09-01" pressed: type: event description: > The tip's button was pressed extra_keys: identifier: description: "The identifier of the tip the action was taken on" bugs: - https://github.com/mozilla-mobile/fenix/issues/9328 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/9836 notification_emails: - fenix-core@mozilla.com expires: "2020-09-01" closed: type: event description: > The tip was closed extra_keys: identifier: description: "The identifier of the tip closed" bugs: - https://github.com/mozilla-mobile/fenix/issues/9328 data_reviews: - https://github.com/mozilla-mobile/fenix/pull/9836 notification_emails: - fenix-core@mozilla.com expires: "2020-09-01" reader_mode: available: type: event Loading
app/src/main/java/org/mozilla/fenix/FeatureFlags.kt +5 −0 Original line number Diff line number Diff line Loading @@ -43,4 +43,9 @@ object FeatureFlags { * Enables picture-in-picture feature */ val pictureInPicture = Config.channel.isNightlyOrDebug /** * Enables tip feature */ val tips = Config.channel.isDebug }
app/src/main/java/org/mozilla/fenix/components/Components.kt +3 −3 Original line number Diff line number Diff line Loading @@ -10,16 +10,16 @@ import android.content.Intent import androidx.core.net.toUri import mozilla.components.feature.addons.AddonManager import mozilla.components.feature.addons.amo.AddonCollectionProvider import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker import mozilla.components.feature.addons.migration.SupportedAddonsChecker import mozilla.components.feature.addons.update.AddonUpdater import mozilla.components.feature.addons.update.DefaultAddonUpdater import mozilla.components.feature.addons.migration.SupportedAddonsChecker import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker import mozilla.components.lib.publicsuffixlist.PublicSuffixList import mozilla.components.support.migration.state.MigrationStore import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.utils.Mockable import org.mozilla.fenix.utils.ClipboardHandler import org.mozilla.fenix.utils.Mockable import org.mozilla.fenix.wifi.WifiConnectionMonitor import java.util.concurrent.TimeUnit Loading
app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +13 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import org.mozilla.fenix.GleanMetrics.SearchWidget import org.mozilla.fenix.GleanMetrics.SyncAccount import org.mozilla.fenix.GleanMetrics.SyncAuth import org.mozilla.fenix.GleanMetrics.Tab import org.mozilla.fenix.GleanMetrics.Tip import org.mozilla.fenix.GleanMetrics.ToolbarSettings import org.mozilla.fenix.GleanMetrics.TopSites import org.mozilla.fenix.GleanMetrics.TrackingProtection Loading Loading @@ -498,6 +499,18 @@ private val Event.wrapper: EventWrapper<*>? is Event.AddonsOpenInToolbarMenu -> EventWrapper<NoExtraKeys>( { Addons.openAddonInToolbarMenu.record(it) } ) is Event.TipDisplayed -> EventWrapper( { Tip.displayed.record(it) }, { Tip.displayedKeys.valueOf(it) } ) is Event.TipPressed -> EventWrapper( { Tip.pressed.record(it) }, { Tip.pressedKeys.valueOf(it) } ) is Event.TipClosed -> EventWrapper( { Tip.closed.record(it) }, { Tip.closedKeys.valueOf(it) } ) // Don't record other events in Glean: is Event.AddBookmark -> null is Event.OpenedBookmark -> null Loading
app/src/main/java/org/mozilla/fenix/components/metrics/Metrics.kt +16 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import org.mozilla.fenix.GleanMetrics.Events import org.mozilla.fenix.GleanMetrics.Library import org.mozilla.fenix.GleanMetrics.Logins import org.mozilla.fenix.GleanMetrics.SearchShortcuts import org.mozilla.fenix.GleanMetrics.Tip import org.mozilla.fenix.GleanMetrics.ToolbarSettings import org.mozilla.fenix.GleanMetrics.TrackingProtection import org.mozilla.fenix.R Loading Loading @@ -193,6 +194,21 @@ sealed class Event { } } data class TipDisplayed(val identifier: String) : Event() { override val extras: Map<Tip.displayedKeys, String>? get() = hashMapOf(Tip.displayedKeys.identifier to identifier) } data class TipPressed(val identifier: String) : Event() { override val extras: Map<Tip.pressedKeys, String>? get() = hashMapOf(Tip.pressedKeys.identifier to identifier) } data class TipClosed(val identifier: String) : Event() { override val extras: Map<Tip.closedKeys, String>? get() = hashMapOf(Tip.closedKeys.identifier to identifier) } data class ToolbarPositionChanged(val position: Position) : Event() { enum class Position { TOP, BOTTOM } Loading