Skip to content
Snippets Groups Projects
Unverified Commit 3a8d4b97 authored by Alex Catarineu's avatar Alex Catarineu Committed by boklm
Browse files

Bug 40021: Force telemetry=false in Fennec settings migration

parent 38a51d2b
No related branches found
No related tags found
1 merge request!69Rebase android-components patches to v91.0.8
......@@ -93,7 +93,7 @@ sealed class Migration(val currentVersion: Int) {
/**
* Migrates all Fennec settings backed by SharedPreferences.
*/
object Settings : Migration(currentVersion = 2)
object Settings : Migration(currentVersion = 3)
/**
* Migrates / Disables all currently unsupported Add-ons.
......
......@@ -44,16 +44,11 @@ internal object FennecSettingsMigration {
return migrateTelemetryOptInStatus(fennecAppPrefs, fenixAppPrefs)
}
@Suppress("UNUSED_PARAMETER")
private fun migrateTelemetryOptInStatus(
fennecPrefs: SharedPreferences,
fenixPrefs: SharedPreferences
): Result<SettingsMigrationResult> {
// Sanity check: make sure we actually have an FHR value set.
if (!fennecPrefs.contains(FENNEC_PREFS_FHR_KEY)) {
logger.warn("Missing FHR pref value")
return Result.Failure(SettingsMigrationException(SettingsMigrationResult.Failure.MissingFHRPrefValue))
}
// Fennec has two telemetry settings:
// - Firefox Health Report (FHR) - defaults to 'on',
// - Telemetry - defaults to 'off'.
......@@ -66,7 +61,7 @@ internal object FennecSettingsMigration {
// If FHR is disabled by the user, we'll disable telemetry in Fenix. Otherwise, it will be enabled.
// Read Fennec prefs.
val fennecFHRState = fennecPrefs.getBoolean(FENNEC_PREFS_FHR_KEY, false)
val fennecFHRState = false
logger.info("Fennec FHR state is: $fennecFHRState")
// Update Fenix prefs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment