[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.
pull/600/head
Ryan Kelly 4 years ago committed by Arturo Mejia
parent 53afba55c9
commit 23154791ab

@ -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)

Loading…
Cancel
Save