2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] Suppress deprecation warnings for now-deprecated Glean APIs

Glean v39 allows to specify types for event extra keys.
The old API is therefore deprecated.
To avoid to much churn right now and keep the build going let's suppress
the deprecation warnings.
This commit is contained in:
Jan-Erik Rediger 2021-06-09 13:38:21 +02:00 committed by Christian Sadilek
parent 3f213a1f9c
commit 80133db1ce
2 changed files with 6 additions and 0 deletions

View File

@ -99,10 +99,14 @@ private class EventWrapper<T : Enum<T>>(
null
}
@Suppress("DEPRECATION")
// FIXME(#19967): Migrate to non-deprecated API.
this.recorder(extras)
}
}
@Suppress("DEPRECATION")
// FIXME(#19967): Migrate to non-deprecated API.
private val Event.wrapper: EventWrapper<*>?
get() = when (this) {
is Event.OpenedApp -> EventWrapper(

View File

@ -35,6 +35,8 @@ class TelemetryLifecycleObserver(
val lastState = pausedState ?: return
val currentState = createTabState()
@Suppress("DEPRECATION")
// FIXME(#19967): Migrate to non-deprecated API.
EngineMetrics.foregroundMetrics.record(mapOf(
MetricsKeys.backgroundActiveTabs to lastState.activeEngineTabs.toString(),
MetricsKeys.backgroundCrashedTabs to lastState.crashedTabs.toString(),