[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-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



Title: GitLab

Matthew Finkel pushed to branch android-components-60.0.3-10.0-1 at The Tor Project / Applications / android-components

Commits:

2 changed files:

Changes:

  • components/support/migration/src/main/java/mozilla/components/support/migration/FennecMigrator.kt
    ... ... @@ -92,7 +92,7 @@ sealed class Migration(val currentVersion: Int) {
    92 92
         /**
    
    93 93
          * Migrates all Fennec settings backed by SharedPreferences.
    
    94 94
          */
    
    95
    -    object Settings : Migration(currentVersion = 2)
    
    95
    +    object Settings : Migration(currentVersion = 3)
    
    96 96
     
    
    97 97
         /**
    
    98 98
          * 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 {
    44 44
             return migrateTelemetryOptInStatus(fennecAppPrefs, fenixAppPrefs)
    
    45 45
         }
    
    46 46
     
    
    47
    +    @Suppress("UNUSED_PARAMETER")
    
    47 48
         private fun migrateTelemetryOptInStatus(
    
    48 49
             fennecPrefs: SharedPreferences,
    
    49 50
             fenixPrefs: SharedPreferences
    
    50 51
         ): Result<SettingsMigrationResult> {
    
    51
    -        // Sanity check: make sure we actually have an FHR value set.
    
    52
    -        if (!fennecPrefs.contains(FENNEC_PREFS_FHR_KEY)) {
    
    53
    -            logger.warn("Missing FHR pref value")
    
    54
    -            return Result.Failure(SettingsMigrationException(SettingsMigrationResult.Failure.MissingFHRPrefValue))
    
    55
    -        }
    
    56
    -
    
    57 52
             // Fennec has two telemetry settings:
    
    58 53
             // - Firefox Health Report (FHR) - defaults to 'on',
    
    59 54
             // - Telemetry - defaults to 'off'.
    
    ... ... @@ -66,7 +61,7 @@ internal object FennecSettingsMigration {
    66 61
             // If FHR is disabled by the user, we'll disable telemetry in Fenix. Otherwise, it will be enabled.
    
    67 62
     
    
    68 63
             // Read Fennec prefs.
    
    69
    -        val fennecFHRState = fennecPrefs.getBoolean(FENNEC_PREFS_FHR_KEY, false)
    
    64
    +        val fennecFHRState = false
    
    70 65
             logger.info("Fennec FHR state is: $fennecFHRState")
    
    71 66
     
    
    72 67
             // Update Fenix prefs.
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits