[tbb-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] 2 commits: fixup! Bug 40185: Use NimbusDisabled

Dan Ballard (@dan) git at gitlab.torproject.org
Mon Nov 20 15:23:48 UTC 2023



Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android


Commits:
b80a9acc by Dan Ballard at 2023-11-20T07:23:28-08:00
fixup! Bug 40185: Use NimbusDisabled

Bug 41846: Disable new nimbus uses

- - - - -
75972ca2 by Dan Ballard at 2023-11-20T07:23:28-08:00
fixup! Disable features and functionality

disable reengagement service

- - - - -


9 changed files:

- fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
- fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
- fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt
- fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
- fenix/app/src/main/java/org/mozilla/fenix/onboarding/FenixOnboarding.kt
- fenix/app/src/main/java/org/mozilla/fenix/onboarding/ReEngagementNotificationWorker.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt
- fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt


Changes:

=====================================
fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
=====================================
@@ -217,7 +217,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
         )
 
         // Set the metric configuration from Nimbus.
-        Glean.setMetricsEnabledConfig(FxNimbus.features.glean.value().metricsEnabled)
+        // Glean.setMetricsEnabledConfig(FxNimbus.features.glean.value().metricsEnabled)
 
         // We avoid blocking the main thread on startup by setting startup metrics on the background thread.
         val store = components.core.store


=====================================
fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
=====================================
@@ -214,7 +214,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
             OpenBrowserIntentProcessor(this, ::getIntentSessionId),
             OpenSpecificTabIntentProcessor(this),
             OpenPasswordManagerIntentProcessor(),
-            ReEngagementIntentProcessor(this, settings()),
+            //ReEngagementIntentProcessor(this, settings()),
         )
     }
 


=====================================
fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt
=====================================
@@ -376,7 +376,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
 
     override fun navToQuickSettingsSheet(tab: SessionState, sitePermissions: SitePermissions?) {
         val useCase = requireComponents.useCases.trackingProtectionUseCases
-        FxNimbus.features.cookieBanners.recordExposure()
+        // FxNimbus.features.cookieBanners.recordExposure()
         useCase.containsException(tab.id) { hasTrackingProtectionException ->
             lifecycleScope.launch {
                 val cookieBannersStorage = requireComponents.core.cookieBannersStorage


=====================================
fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
=====================================
@@ -446,7 +446,7 @@ class HomeFragment : Fragment() {
 
         activity.themeManager.applyStatusBarTheme(activity)
 
-        FxNimbus.features.homescreen.recordExposure()
+        // FxNimbus.features.homescreen.recordExposure()
 
         controlYECDisplay()
 


=====================================
fenix/app/src/main/java/org/mozilla/fenix/onboarding/FenixOnboarding.kt
=====================================
@@ -33,7 +33,7 @@ class FenixOnboarding(context: Context) : PreferencesHolder {
     // - We would like to evaluate the configuration only once (and thus it's kept in memory
     // and not re-evaluated)
     val config by lazy {
-        FxNimbus.features.onboarding.recordExposure()
+        // FxNimbus.features.onboarding.recordExposure()
         FxNimbus.features.onboarding.value()
     }
 


=====================================
fenix/app/src/main/java/org/mozilla/fenix/onboarding/ReEngagementNotificationWorker.kt
=====================================
@@ -44,7 +44,7 @@ class ReEngagementNotificationWorker(
 
         // Recording the exposure event here to capture all users who met all criteria to receive
         // the re-engagement notification
-        FxNimbus.features.reEngagementNotification.recordExposure()
+        // FxNimbus.features.reEngagementNotification.recordExposure()
 
         if (!settings.reEngagementNotificationEnabled) {
             return Result.success()


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
=====================================
@@ -297,7 +297,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
                 SettingsFragmentDirections.actionSettingsFragmentToHttpsOnlyFragment()
             }
             resources.getString(R.string.pref_key_cookie_banner_settings) -> {
-                FxNimbus.features.cookieBanners.recordExposure()
+                // FxNimbus.features.cookieBanners.recordExposure()
                 CookieBanners.visitedSetting.record(mozilla.components.service.glean.private.NoExtras())
                 SettingsFragmentDirections.actionSettingsFragmentToCookieBannerFragment()
             }


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt
=====================================
@@ -39,7 +39,7 @@ class DefaultLocaleSettingsController(
         LocaleManager.updateBaseConfiguration(activity, locale)
 
         // Invalidate cached values to use the new locale
-        FxNimbus.features.nimbusValidation.withCachedValue(null)
+        // FxNimbus.features.nimbusValidation.withCachedValue(null)
         activity.recreate()
         activity.overridePendingTransition(0, 0)
     }
@@ -54,7 +54,7 @@ class DefaultLocaleSettingsController(
         LocaleManager.updateBaseConfiguration(activity, localeSettingsStore.state.localeList[0])
 
         // Invalidate cached values to use the default locale
-        FxNimbus.features.nimbusValidation.withCachedValue(null)
+        // FxNimbus.features.nimbusValidation.withCachedValue(null)
         activity.recreate()
         activity.overridePendingTransition(0, 0)
     }


=====================================
fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
=====================================
@@ -285,7 +285,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     var showWallpaperOnboarding by lazyFeatureFlagPreference(
         key = appContext.getPreferenceKey(R.string.pref_key_wallpapers_onboarding),
         featureFlag = true,
-        default = { mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true },
+        default = { true /* mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true */ },
     )
 
     var openLinksInAPrivateTab by booleanPreference(
@@ -651,7 +651,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     var shouldUseCookieBanner by lazyFeatureFlagPreference(
         appContext.getPreferenceKey(R.string.pref_key_cookie_banner_v1),
         featureFlag = true,
-        default = { cookieBannersSection[CookieBannersSection.FEATURE_SETTING_VALUE] == 1 },
+        default = { false /* cookieBannersSection[CookieBannersSection.FEATURE_SETTING_VALUE] == 1 */ },
     )
 
     var userOptOutOfReEngageCookieBannerDialog by booleanPreference(
@@ -672,7 +672,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     )
 
     val shouldShowCookieBannerUI: Boolean
-        get() = cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1
+        get() = false // cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1
 
     /**
      * Indicates after how many hours a cookie banner dialog should be shown again
@@ -680,7 +680,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     @VisibleForTesting
     internal val timerForCookieBannerDialog: Long
         get() = 60 * 60 * 1000L *
-            (cookieBannersSection[CookieBannersSection.DIALOG_RE_ENGAGE_TIME] ?: 4)
+            (/* cookieBannersSection[CookieBannersSection.DIALOG_RE_ENGAGE_TIME] ?: */ 4)
 
     /**
      * Indicates if we should should show the cookie banner dialog that invites the user to turn-on
@@ -754,8 +754,8 @@ class Settings(private val appContext: Context) : PreferencesHolder {
      * Indicates if the re-engagement notification feature is enabled
      */
     val reEngagementNotificationType: Int
-        get() =
-            FxNimbus.features.reEngagementNotification.value().type
+        get() = 0 // Neither Type A or B
+            // FxNimbus.features.reEngagementNotification.value().type
 
     val shouldUseAutoBatteryTheme by booleanPreference(
         appContext.getPreferenceKey(R.string.pref_key_auto_battery_theme),
@@ -801,13 +801,13 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     )
 
     val enabledTotalCookieProtection: Boolean
-        get() = mr2022Sections[Mr2022Section.TCP_FEATURE] == true
+        get() = /*mr2022Sections[Mr2022Section.TCP_FEATURE] ==*/ false
 
     /**
      * Indicates if the total cookie protection CRF feature is enabled.
      */
     val enabledTotalCookieProtectionCFR: Boolean
-        get() = mr2022Sections[Mr2022Section.TCP_CFR] == true
+        get() = /* mr2022Sections[Mr2022Section.TCP_CFR] ==*/ false
 
     /**
      * Indicates if the total cookie protection CRF should be shown.
@@ -971,16 +971,16 @@ class Settings(private val appContext: Context) : PreferencesHolder {
             return touchExplorationIsEnabled || switchServiceIsEnabled
         }
 
-    val toolbarPositionTop: Boolean
-        get() = FxNimbus.features.toolbar.value().toolbarPositionTop
+    // val toolbarPositionTop: Boolean
+    //    get() = FxNimbus.features.toolbar.value().toolbarPositionTop
 
     /**
      * Checks if we should default to bottom toolbar.
      */
     fun shouldDefaultToBottomToolbar(): Boolean {
         // Default accessibility users to top toolbar
-        return (!touchExplorationIsEnabled && !switchServiceIsEnabled) &&
-            !toolbarPositionTop
+        return (!touchExplorationIsEnabled && !switchServiceIsEnabled) /* &&
+            !toolbarPositionTop */
     }
 
     fun getDeleteDataOnQuit(type: DeleteBrowsingDataOnQuitType): Boolean =
@@ -1122,7 +1122,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     var shouldShowJumpBackInCFR by lazyFeatureFlagPreference(
         appContext.getPreferenceKey(R.string.pref_key_should_show_jump_back_in_tabs_popup),
         featureFlag = true,
-        default = { mr2022Sections[Mr2022Section.JUMP_BACK_IN_CFR] == true },
+        default = { true /* mr2022Sections[Mr2022Section.JUMP_BACK_IN_CFR] == true */},
     )
 
     /**
@@ -1502,13 +1502,13 @@ class Settings(private val appContext: Context) : PreferencesHolder {
         ).contains(langTag)
     }
 
-    private val mr2022Sections: Map<Mr2022Section, Boolean>
-        get() =
-            FxNimbus.features.mr2022.value().sectionsEnabled
+    //private val mr2022Sections: Map<Mr2022Section, Boolean>
+    //    get() =
+    //        FxNimbus.features.mr2022.value().sectionsEnabled
 
-    private val cookieBannersSection: Map<CookieBannersSection, Int>
-        get() =
-            FxNimbus.features.cookieBanners.value().sectionsEnabled
+    //private val cookieBannersSection: Map<CookieBannersSection, Int>
+    //    get() =
+    //        FxNimbus.features.cookieBanners.value().sectionsEnabled
 
     // IN TOR BROWSER: we want to avoid ever calling Nimbus, so we hard-code defaults
     // for everything that would have accessed this property.
@@ -1524,7 +1524,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     var showSyncCFR by lazyFeatureFlagPreference(
         appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
         featureFlag = true,
-        default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
+        default = { false /* mr2022Sections[Mr2022Section.SYNC_CFR] == true */ },
     )
 
     /**
@@ -1533,7 +1533,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
     var showHomeOnboardingDialog by lazyFeatureFlagPreference(
         appContext.getPreferenceKey(R.string.pref_key_should_show_home_onboarding_dialog),
         featureFlag = true,
-        default = { mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true },
+        default = { true /* mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true */ },
     )
 
     /**
@@ -1703,7 +1703,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
      * Indicates if juno onboarding feature is enabled.
      */
     val junoOnboardingEnabled: Boolean
-        get() = FxNimbus.features.junoOnboarding.value().enabled
+        get() = false //FxNimbus.features.junoOnboarding.value().enabled
 
     /**
      * Returns whether juno onboarding should be shown to the user.
@@ -1712,8 +1712,9 @@ class Settings(private val appContext: Context) : PreferencesHolder {
      */
     fun shouldShowJunoOnboarding(hasUserBeenOnboarded: Boolean, isLauncherIntent: Boolean): Boolean {
         return if (!hasUserBeenOnboarded && isLauncherIntent) {
-            FxNimbus.features.junoOnboarding.recordExposure()
-            junoOnboardingEnabled
+            // FxNimbus.features.junoOnboarding.recordExposure()
+            // junoOnboardingEnabled
+            false
         } else {
             false
         }



View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/19ec8acc732943a2ddb154f735a3eab4d3fbda99...75972ca2e3c512245924fe0ba374d0548b1a39be

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/19ec8acc732943a2ddb154f735a3eab4d3fbda99...75972ca2e3c512245924fe0ba374d0548b1a39be
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/20231120/985cb7dd/attachment-0001.htm>


More information about the tbb-commits mailing list