Bug 1871548 - Add telemetry for Open PDF in Fenix

(cherry picked from commit 54e7320d1d77484ee9ce0ac8fccacadfc06a7cfd)
fenix/122.0
Titouan Thibaud 5 months ago committed by mergify[bot]
parent 578f8e2164
commit dba7a5f241

@ -376,6 +376,27 @@ events:
metadata:
tags:
- PrivateBrowsing
opened_ext_pdf:
type: event
description: |
A user opened a PDF with Fenix from another app
extra_keys:
referrer_is_fenix:
description: |
If the PDF was opened from Fenix itself (for example from the Download notification)
type: boolean
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1871548
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/4940
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- mcastelluccio@mozilla.com
- calixte@mozilla.com
- sylvestre@mozilla.com
expires: never
synced_tab_opened:
type: event
description: |

@ -15,6 +15,7 @@ import mozilla.components.feature.intent.ext.sanitize
import mozilla.components.feature.intent.processing.IntentProcessor
import mozilla.components.support.utils.EXTRA_ACTIVITY_REFERRER_CATEGORY
import mozilla.components.support.utils.EXTRA_ACTIVITY_REFERRER_PACKAGE
import mozilla.components.support.utils.INTENT_TYPE_PDF
import mozilla.components.support.utils.ext.getApplicationInfoCompat
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.HomeActivity.Companion.PRIVATE_BROWSING_MODE
@ -73,6 +74,12 @@ class IntentReceiverActivity : Activity() {
addReferrerInformation(intent)
if (intent.type == INTENT_TYPE_PDF) {
val referrerIsFenix =
intent.getStringExtra(EXTRA_ACTIVITY_REFERRER_PACKAGE) == this.packageName
Events.openedExtPdf.record(Events.OpenedExtPdfExtra(referrerIsFenix))
}
val processor = getIntentProcessors(private).firstOrNull { it.process(intent) }
val intentProcessorType = components.intentProcessors.getType(processor)

Loading…
Cancel
Save