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 2d2be26fbc
commit d55f55d70c
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(),