Matthew Finkel pushed to branch android-components-60.0.3-10.0-1 at The Tor Project / Applications / android-components
Commits: 4693b3c0 by Alex Catarineu at 2020-10-21T16:17:57+02:00 Bug 40021: Force telemetry=false in Fennec settings migration
- - - - - cda23d34 by Matthew Finkel at 2020-10-21T20:13:36+00:00 Merge remote-tracking branch 'acatgl/40021' into android-components-60.0.3-10.0-1
- - - - -
2 changed files:
- components/support/migration/src/main/java/mozilla/components/support/migration/FennecMigrator.kt - components/support/migration/src/main/java/mozilla/components/support/migration/FennecSettingsMigrator.kt
Changes:
===================================== components/support/migration/src/main/java/mozilla/components/support/migration/FennecMigrator.kt ===================================== @@ -92,7 +92,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.
===================================== components/support/migration/src/main/java/mozilla/components/support/migration/FennecSettingsMigrator.kt ===================================== @@ -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.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/...