Verified Commit d90206b2 authored by Alex Catarineu's avatar Alex Catarineu Committed by boklm
Browse files

Bug 40021: Force telemetry=false in Fennec settings migration

parent 9d43e371
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment