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

[fenix] Reset experiment telemetry identifiers on data prefs change.

When the user opts out of telemetry, we need to reset the user identifiers
used by the experiment system, so that there's no risk of tracking the
user across the reset event if they later decide to re-enable telemetry.
This commit is contained in:
Ryan Kelly 2020-12-17 14:28:30 +11:00 committed by Arturo Mejia
parent 53afba55c9
commit 23154791ab

View File

@ -31,6 +31,10 @@ class DataChoicesFragment : PreferenceFragmentCompat() {
} else {
context.components.analytics.metrics.stop(MetricServiceType.Data)
}
// Reset experiment identifiers on both opt-in and opt-out; it's likely
// that in future we will need to pass in the new telemetry client_id
// to this method when the user opts back in.
context.components.analytics.experiments.resetTelemetryIdentifiers()
} else if (key == getPreferenceKey(R.string.pref_key_marketing_telemetry)) {
if (context.settings().isMarketingTelemetryEnabled) {
context.components.analytics.metrics.start(MetricServiceType.Marketing)