2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/20461: remove app_received_intent probe.

This commit is contained in:
Michael Comella 2021-07-30 14:42:08 -07:00 committed by mergify[bot]
parent 979c757cd2
commit 68bef957b5
5 changed files with 0 additions and 63 deletions

View File

@ -8,35 +8,6 @@ no_lint:
- CATEGORY_GENERIC - CATEGORY_GENERIC
events: 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: app_opened:
type: event type: event
description: | description: |

View File

@ -238,10 +238,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
safeIntent safeIntent
?.let(::getIntentSource) ?.let(::getIntentSource)
?.also { components.analytics.metrics.track(Event.OpenedApp(it)) } ?.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() supportActionBar?.hide()
@ -474,14 +470,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
?.let { it as? TabsTrayFragment } ?.let { it as? TabsTrayFragment }
?.also { it.dismissAllowingStateLoss() } ?.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 * 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 * private mode directly before the content view is created. Returns the mode set by the intent

View File

@ -413,14 +413,6 @@ sealed class Event {
get() = hashMapOf(Events.appOpenedKeys.source to source.name) 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<Events.appReceivedIntentKeys, String>?
get() = hashMapOf(Events.appReceivedIntentKeys.source to source.name)
}
data class CollectionSaveButtonPressed(val fromScreen: String) : Event() { data class CollectionSaveButtonPressed(val fromScreen: String) : Event() {
override val extras: Map<Collections.saveButtonKeys, String>? override val extras: Map<Collections.saveButtonKeys, String>?
get() = mapOf(Collections.saveButtonKeys.fromScreen to fromScreen) get() = mapOf(Collections.saveButtonKeys.fromScreen to fromScreen)

View File

@ -115,10 +115,6 @@ private val Event.wrapper: EventWrapper<*>?
{ Events.appOpened.record(it) }, { Events.appOpened.record(it) },
{ Events.appOpenedKeys.valueOf(it) } { Events.appOpenedKeys.valueOf(it) }
) )
is Event.AppReceivedIntent -> EventWrapper(
{ Events.appReceivedIntent.record(it) },
{ Events.appReceivedIntentKeys.valueOf(it) }
)
is Event.SearchBarTapped -> EventWrapper( is Event.SearchBarTapped -> EventWrapper(
{ Events.searchBarTapped.record(it) }, { Events.searchBarTapped.record(it) },
{ Events.searchBarTappedKeys.valueOf(it) } { Events.searchBarTappedKeys.valueOf(it) }

View File

@ -48,8 +48,6 @@ open class ExternalAppBrowserActivity : HomeActivity() {
final override fun getIntentSource(intent: SafeIntent) = Event.OpenedApp.Source.CUSTOM_TAB 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() final override fun getIntentSessionId(intent: SafeIntent) = intent.getSessionId()
override fun navigateToBrowserOnColdStart() { override fun navigateToBrowserOnColdStart() {