Skip to content

Commit

Permalink
For mozilla-mobile#24838 - Remove Event.wrapper for Tabs telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandru2909 committed Apr 18, 2022
1 parent d03497a commit 7600206
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ sealed class Event {
object HistorySearchGroupOpened : Event()
object SearchWidgetInstalled : Event()

object TabSettingsOpened : Event()

object SyncedTabSuggestionClicked : Event()
object BookmarkSuggestionClicked : Event()
object ClipboardSuggestionClicked : Event()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import org.mozilla.fenix.GleanMetrics.BrowserSearch
import org.mozilla.fenix.GleanMetrics.Pings
import org.mozilla.fenix.GleanMetrics.RecentlyVisitedHomepage
import org.mozilla.fenix.GleanMetrics.SyncedTabs
import org.mozilla.fenix.GleanMetrics.Tabs
import org.mozilla.fenix.GleanMetrics.Messaging
import org.mozilla.fenix.ext.components

Expand Down Expand Up @@ -76,9 +75,6 @@ private val Event.wrapper: EventWrapper<*>?
}
)

is Event.TabSettingsOpened -> EventWrapper<NoExtraKeys>(
{ Tabs.settingOpened.record(it) }
)
is Event.SyncedTabSuggestionClicked -> EventWrapper<NoExtraKeys>(
{ SyncedTabs.syncedTabsSuggestionClicked.record(it) }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import android.view.View
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference
import mozilla.telemetry.glean.private.NoExtras
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.GleanMetrics.Tabs
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components
Expand Down Expand Up @@ -38,7 +40,7 @@ class TabsSettingsFragment : PreferenceFragmentCompat() {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
view.context.components.analytics.metrics.track(Event.TabSettingsOpened)
Tabs.settingOpened.record(NoExtras())
}

override fun onResume() {
Expand Down

0 comments on commit 7600206

Please sign in to comment.