Close #27779: Add telemetry for showing the default browser notification

pull/543/head
Roger Yang 2 years ago committed by mergify[bot]
parent 7c92420690
commit be63c162b0

@ -198,6 +198,19 @@ events:
- android-probes@mozilla.com
- kbrosnan@mozilla.com
expires: never
default_browser_notif_shown:
type: event
description: |
Default browser notification was shown to the user
bugs:
- https://github.com/mozilla-mobile/fenix/issues/27779
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/27780
data_sensitivity:
- technical
notification_emails:
- android-probes@mozilla.com
expires: 122
toolbar_menu_visible:
type: event
description: |

@ -19,7 +19,9 @@ import androidx.work.OneTimeWorkRequest
import androidx.work.WorkManager
import androidx.work.Worker
import androidx.work.WorkerParameters
import mozilla.components.service.glean.private.NoExtras
import mozilla.components.support.base.ids.SharedIdsHelper
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.settings
@ -36,6 +38,7 @@ class DefaultBrowserNotificationWorker(
ensureChannelExists()
NotificationManagerCompat.from(applicationContext)
.notify(NOTIFICATION_TAG, NOTIFICATION_ID, buildNotification())
Events.defaultBrowserNotifShown.record(NoExtras())
// default browser notification should only happen once
applicationContext.settings().defaultBrowserNotificationDisplayed = true

Loading…
Cancel
Save