Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
android-components
Commits
096ab357
Unverified
Commit
096ab357
authored
Oct 21, 2020
by
Alex Catarineu
Committed by
boklm
Jul 14, 2021
Browse files
Bug 40021: Force telemetry=false in Fennec settings migration
parent
81fc3d4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
components/support/migration/src/main/java/mozilla/components/support/migration/FennecMigrator.kt
View file @
096ab357
...
...
@@ -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.
...
...
components/support/migration/src/main/java/mozilla/components/support/migration/FennecSettingsMigrator.kt
View file @
096ab357
...
...
@@ -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.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment