Dan Ballard pushed to branch tor-browser-128.9.0esr-14.5-1 at The Tor Project / 
Applications / Tor Browser


Commits:
a97a4df4 by Pier Angelo Vendrame at 2025-04-14T14:59:47+02:00
fixup! TB 43505 [android]: Add 2025 UX Survey Campaign

TB 43648: Survey fixes for Android.

Display the survey for all languages, but display it only in the
release channel.

- - - - -


2 changed files:

- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
- 
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/CampaignStrings.kt


Changes:

=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
=====================================
@@ -557,9 +557,6 @@ class HomeFragment : Fragment(), UserInteractionHandler {
     }
 
     private fun tryShowUX2025Survey() {
-        val allowedLocales = arrayListOf("en", "es", "ru", "fr", "pt")
-        val locale = CampaignStrings.getLocale()
-
         val dateFormat = SimpleDateFormat("yyyy-MM-dd-hh-zzz")
         val startDate = dateFormat.parse("2025-04-14-12-UTC")
 
@@ -570,7 +567,7 @@ class HomeFragment : Fragment(), UserInteractionHandler {
             return // comment out to test
         }
 
-        if (allowedLocales.contains(locale) && 
!requireContext().settings().hideCampaign) {
+        if (BuildConfig.BUILD_TYPE == "release" && 
!requireContext().settings().hideCampaign) {
             binding.onionPatternImage.visibility = View.GONE
             binding.campaignBox.apply {
                 
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)


=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/CampaignStrings.kt
=====================================
@@ -49,8 +49,11 @@ object CampaignStrings {
     )
 
     fun getLocale(): String {
-        // TODO: do we care about spoofEnglish setting?
-        return Locale.getDefault().getLanguage();
+        val locale = Locale.getDefault().getLanguage()
+        if (translations.containsKey(locale)) {
+            return locale
+        }
+        return "en"
     }
 
 



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a97a4df4df6b5af60a422c974a71eb131e1f51b0

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a97a4df4df6b5af60a422c974a71eb131e1f51b0
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to