tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit ec7e44779f6f54e74f3392edcfab4863875d9d2f
parent de5d23148aa4326f62756a5653df6da5025d8464
Author: Bastian Gruber <foreach@me.com>
Date:   Fri,  3 Oct 2025 17:42:41 +0000

Bug 1988523 - Update Fenix to new Nimbus SDK r=android-reviewers,nalexander,beth

- split globalParticipation into rollouts and experiments

Differential Revision: https://phabricator.services.mozilla.com/D264787

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/datachoices/DataChoicesMiddleware.kt | 8++++++--
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/studies/StudiesView.kt | 4+++-
Mmobile/android/fenix/app/src/test/java/org/mozilla/fenix/nimbus/TestNimbusApi.kt | 3++-
Mmobile/android/fenix/app/src/test/java/org/mozilla/fenix/splashscreen/SplashScreenOperationTest.kt | 3++-
4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/datachoices/DataChoicesMiddleware.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/datachoices/DataChoicesMiddleware.kt @@ -104,12 +104,16 @@ internal class DataChoicesMiddleware( if (!settings.hasUserDisabledExperimentation) { settings.isExperimentationEnabled = true } - nimbusSdk.globalUserParticipation = true + // Use separate participation flags for experiments and rollouts + nimbusSdk.experimentParticipation = true + nimbusSdk.rolloutParticipation = true engine.notifyTelemetryPrefChanged(true) } else { metrics.stop(MetricServiceType.Data) settings.isExperimentationEnabled = false - nimbusSdk.globalUserParticipation = false + // Use separate participation flags for experiments and rollouts + nimbusSdk.experimentParticipation = false + nimbusSdk.rolloutParticipation = false engine.notifyTelemetryPrefChanged(false) } // Reset experiment identifiers on both opt-in and opt-out; it's likely diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/studies/StudiesView.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/studies/StudiesView.kt @@ -63,7 +63,9 @@ class StudiesView( val experimentsKey = context.getPreferenceKey(R.string.pref_key_experimentation_v2) context.settings().preferences.edit(commit = true) { putBoolean(experimentsKey, isChecked) } - experiments.globalUserParticipation = isChecked + // Use experimentParticipation for studies-specific settings + experiments.experimentParticipation = isChecked + experiments.rolloutParticipation = isChecked } bindDescription() diff --git a/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/nimbus/TestNimbusApi.kt b/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/nimbus/TestNimbusApi.kt @@ -53,5 +53,6 @@ abstract class TestNimbusApi( override val context: Context get() = testContext - override var globalUserParticipation: Boolean = true + override var experimentParticipation: Boolean = true + override var rolloutParticipation: Boolean = true } diff --git a/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/splashscreen/SplashScreenOperationTest.kt b/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/splashscreen/SplashScreenOperationTest.kt @@ -215,7 +215,8 @@ class SplashScreenOperationTest { override val context: Context get() = testContext - override var globalUserParticipation: Boolean = true + override var experimentParticipation: Boolean = true + override var rolloutParticipation: Boolean = true } private fun buildStorage(