[tbb-commits] [Git][tpo/applications/android-components][android-components-60.0.3-10.0-1] 2 commits: Bug 40021: Force telemetry=false in Fennec settings migration
Matthew Finkel
gitlab at torproject.org
Wed Oct 21 20:13:51 UTC 2020
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/86094a926a304ddd76690f4263b1d7ee8b41e7be...cda23d340dafbe3731b0cb3c0f8d2a4c3986fedf
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/86094a926a304ddd76690f4263b1d7ee8b41e7be...cda23d340dafbe3731b0cb3c0f8d2a4c3986fedf
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20201021/28db694e/attachment-0001.htm>
More information about the tbb-commits
mailing list