diff --git a/app/metrics.yaml b/app/metrics.yaml index 55ea2da9aa..973757f2a1 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -8,35 +8,6 @@ no_lint: - CATEGORY_GENERIC events: - app_received_intent: - type: event - description: | - The system received an Intent for the HomeActivity. An intent - is received an external entity wants to the app to display - content. Intents can be received when the app is closed – at - which point the app will be opened – or when the app is - already opened – at which point the already open app will make - changes such as loading a url. This can be used loosely as a - heuristic for when the user requested to open the app. The - HomeActivity encompasses the home screen and browser screen but - may include other screens. This differs from the app_opened - probe because it measures all startups, not just cold startup. - extra_keys: - source: - description: | - The method used to open Fenix. Possible values are `app_icon`, - `custom_tab`, `link` or `unknown` - bugs: - - https://github.com/mozilla-mobile/fenix/issues/11830 - - https://github.com/mozilla-mobile/fenix/issues/19923 - data_reviews: - - https://github.com/mozilla-mobile/fenix/pull/11940/ - - https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877 - - https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789 - notification_emails: - - esmyth@mozilla.com - - perf-android-fe@mozilla.com - expires: "2021-12-01" app_opened: type: event description: | diff --git a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt index 1e49d3ba44..7c24d865d7 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -238,10 +238,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { safeIntent ?.let(::getIntentSource) ?.also { components.analytics.metrics.track(Event.OpenedApp(it)) } - // record on cold startup - safeIntent - ?.let(::getIntentAllSource) - ?.also { components.analytics.metrics.track(Event.AppReceivedIntent(it)) } } supportActionBar?.hide() @@ -474,14 +470,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { ?.let { it as? TabsTrayFragment } ?.also { it.dismissAllowingStateLoss() } } - - // Note: This does not work in case of an user sending an intent with ACTION_VIEW - // for example, launch the application, and than use adb to send an intent with - // ACTION_VIEW to open a link. In this case, we will get multiple telemetry events. - intent - .toSafeIntent() - .let(::getIntentAllSource) - ?.also { components.analytics.metrics.track(Event.AppReceivedIntent(it)) } } /** @@ -637,14 +625,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { } } - protected open fun getIntentAllSource(intent: SafeIntent): Event.AppReceivedIntent.Source? { - return when { - intent.isLauncherIntent -> Event.AppReceivedIntent.Source.APP_ICON - intent.action == Intent.ACTION_VIEW -> Event.AppReceivedIntent.Source.LINK - else -> Event.AppReceivedIntent.Source.UNKNOWN - } - } - /** * External sources such as 3rd party links and shortcuts use this function to enter * private mode directly before the content view is created. Returns the mode set by the intent diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt index 834c66d523..20ac2cb5d2 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt @@ -413,14 +413,6 @@ sealed class Event { get() = hashMapOf(Events.appOpenedKeys.source to source.name) } - data class AppReceivedIntent(val source: Source) : Event() { - - enum class Source { APP_ICON, LINK, CUSTOM_TAB, UNKNOWN } - - override val extras: Map? - get() = hashMapOf(Events.appReceivedIntentKeys.source to source.name) - } - data class CollectionSaveButtonPressed(val fromScreen: String) : Event() { override val extras: Map? get() = mapOf(Collections.saveButtonKeys.fromScreen to fromScreen) diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index 54dc5f5e49..935576c451 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -115,10 +115,6 @@ private val Event.wrapper: EventWrapper<*>? { Events.appOpened.record(it) }, { Events.appOpenedKeys.valueOf(it) } ) - is Event.AppReceivedIntent -> EventWrapper( - { Events.appReceivedIntent.record(it) }, - { Events.appReceivedIntentKeys.valueOf(it) } - ) is Event.SearchBarTapped -> EventWrapper( { Events.searchBarTapped.record(it) }, { Events.searchBarTappedKeys.valueOf(it) } diff --git a/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt b/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt index 0c67ac93ee..a8331af697 100644 --- a/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/customtabs/ExternalAppBrowserActivity.kt @@ -48,8 +48,6 @@ open class ExternalAppBrowserActivity : HomeActivity() { final override fun getIntentSource(intent: SafeIntent) = Event.OpenedApp.Source.CUSTOM_TAB - final override fun getIntentAllSource(intent: SafeIntent) = Event.AppReceivedIntent.Source.CUSTOM_TAB - final override fun getIntentSessionId(intent: SafeIntent) = intent.getSessionId() override fun navigateToBrowserOnColdStart() {