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

Commits:

9 changed files:

Changes:

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

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

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

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

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

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

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

  • fenix/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt
    ... ... @@ -39,7 +39,7 @@ class DefaultLocaleSettingsController(
    39 39
             LocaleManager.updateBaseConfiguration(activity, locale)
    
    40 40
     
    
    41 41
             // Invalidate cached values to use the new locale
    
    42
    -        FxNimbus.features.nimbusValidation.withCachedValue(null)
    
    42
    +        // FxNimbus.features.nimbusValidation.withCachedValue(null)
    
    43 43
             activity.recreate()
    
    44 44
             activity.overridePendingTransition(0, 0)
    
    45 45
         }
    
    ... ... @@ -54,7 +54,7 @@ class DefaultLocaleSettingsController(
    54 54
             LocaleManager.updateBaseConfiguration(activity, localeSettingsStore.state.localeList[0])
    
    55 55
     
    
    56 56
             // Invalidate cached values to use the default locale
    
    57
    -        FxNimbus.features.nimbusValidation.withCachedValue(null)
    
    57
    +        // FxNimbus.features.nimbusValidation.withCachedValue(null)
    
    58 58
             activity.recreate()
    
    59 59
             activity.overridePendingTransition(0, 0)
    
    60 60
         }
    

  • fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
    ... ... @@ -285,7 +285,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    285 285
         var showWallpaperOnboarding by lazyFeatureFlagPreference(
    
    286 286
             key = appContext.getPreferenceKey(R.string.pref_key_wallpapers_onboarding),
    
    287 287
             featureFlag = true,
    
    288
    -        default = { mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true },
    
    288
    +        default = { true /* mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true */ },
    
    289 289
         )
    
    290 290
     
    
    291 291
         var openLinksInAPrivateTab by booleanPreference(
    
    ... ... @@ -651,7 +651,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    651 651
         var shouldUseCookieBanner by lazyFeatureFlagPreference(
    
    652 652
             appContext.getPreferenceKey(R.string.pref_key_cookie_banner_v1),
    
    653 653
             featureFlag = true,
    
    654
    -        default = { cookieBannersSection[CookieBannersSection.FEATURE_SETTING_VALUE] == 1 },
    
    654
    +        default = { false /* cookieBannersSection[CookieBannersSection.FEATURE_SETTING_VALUE] == 1 */ },
    
    655 655
         )
    
    656 656
     
    
    657 657
         var userOptOutOfReEngageCookieBannerDialog by booleanPreference(
    
    ... ... @@ -672,7 +672,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    672 672
         )
    
    673 673
     
    
    674 674
         val shouldShowCookieBannerUI: Boolean
    
    675
    -        get() = cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1
    
    675
    +        get() = false // cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1
    
    676 676
     
    
    677 677
         /**
    
    678 678
          * Indicates after how many hours a cookie banner dialog should be shown again
    
    ... ... @@ -680,7 +680,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    680 680
         @VisibleForTesting
    
    681 681
         internal val timerForCookieBannerDialog: Long
    
    682 682
             get() = 60 * 60 * 1000L *
    
    683
    -            (cookieBannersSection[CookieBannersSection.DIALOG_RE_ENGAGE_TIME] ?: 4)
    
    683
    +            (/* cookieBannersSection[CookieBannersSection.DIALOG_RE_ENGAGE_TIME] ?: */ 4)
    
    684 684
     
    
    685 685
         /**
    
    686 686
          * 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 {
    754 754
          * Indicates if the re-engagement notification feature is enabled
    
    755 755
          */
    
    756 756
         val reEngagementNotificationType: Int
    
    757
    -        get() =
    
    758
    -            FxNimbus.features.reEngagementNotification.value().type
    
    757
    +        get() = 0 // Neither Type A or B
    
    758
    +            // FxNimbus.features.reEngagementNotification.value().type
    
    759 759
     
    
    760 760
         val shouldUseAutoBatteryTheme by booleanPreference(
    
    761 761
             appContext.getPreferenceKey(R.string.pref_key_auto_battery_theme),
    
    ... ... @@ -801,13 +801,13 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    801 801
         )
    
    802 802
     
    
    803 803
         val enabledTotalCookieProtection: Boolean
    
    804
    -        get() = mr2022Sections[Mr2022Section.TCP_FEATURE] == true
    
    804
    +        get() = /*mr2022Sections[Mr2022Section.TCP_FEATURE] ==*/ false
    
    805 805
     
    
    806 806
         /**
    
    807 807
          * Indicates if the total cookie protection CRF feature is enabled.
    
    808 808
          */
    
    809 809
         val enabledTotalCookieProtectionCFR: Boolean
    
    810
    -        get() = mr2022Sections[Mr2022Section.TCP_CFR] == true
    
    810
    +        get() = /* mr2022Sections[Mr2022Section.TCP_CFR] ==*/ false
    
    811 811
     
    
    812 812
         /**
    
    813 813
          * Indicates if the total cookie protection CRF should be shown.
    
    ... ... @@ -971,16 +971,16 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    971 971
                 return touchExplorationIsEnabled || switchServiceIsEnabled
    
    972 972
             }
    
    973 973
     
    
    974
    -    val toolbarPositionTop: Boolean
    
    975
    -        get() = FxNimbus.features.toolbar.value().toolbarPositionTop
    
    974
    +    // val toolbarPositionTop: Boolean
    
    975
    +    //    get() = FxNimbus.features.toolbar.value().toolbarPositionTop
    
    976 976
     
    
    977 977
         /**
    
    978 978
          * Checks if we should default to bottom toolbar.
    
    979 979
          */
    
    980 980
         fun shouldDefaultToBottomToolbar(): Boolean {
    
    981 981
             // Default accessibility users to top toolbar
    
    982
    -        return (!touchExplorationIsEnabled && !switchServiceIsEnabled) &&
    
    983
    -            !toolbarPositionTop
    
    982
    +        return (!touchExplorationIsEnabled && !switchServiceIsEnabled) /* &&
    
    983
    +            !toolbarPositionTop */
    
    984 984
         }
    
    985 985
     
    
    986 986
         fun getDeleteDataOnQuit(type: DeleteBrowsingDataOnQuitType): Boolean =
    
    ... ... @@ -1122,7 +1122,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    1122 1122
         var shouldShowJumpBackInCFR by lazyFeatureFlagPreference(
    
    1123 1123
             appContext.getPreferenceKey(R.string.pref_key_should_show_jump_back_in_tabs_popup),
    
    1124 1124
             featureFlag = true,
    
    1125
    -        default = { mr2022Sections[Mr2022Section.JUMP_BACK_IN_CFR] == true },
    
    1125
    +        default = { true /* mr2022Sections[Mr2022Section.JUMP_BACK_IN_CFR] == true */},
    
    1126 1126
         )
    
    1127 1127
     
    
    1128 1128
         /**
    
    ... ... @@ -1502,13 +1502,13 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    1502 1502
             ).contains(langTag)
    
    1503 1503
         }
    
    1504 1504
     
    
    1505
    -    private val mr2022Sections: Map<Mr2022Section, Boolean>
    
    1506
    -        get() =
    
    1507
    -            FxNimbus.features.mr2022.value().sectionsEnabled
    
    1505
    +    //private val mr2022Sections: Map<Mr2022Section, Boolean>
    
    1506
    +    //    get() =
    
    1507
    +    //        FxNimbus.features.mr2022.value().sectionsEnabled
    
    1508 1508
     
    
    1509
    -    private val cookieBannersSection: Map<CookieBannersSection, Int>
    
    1510
    -        get() =
    
    1511
    -            FxNimbus.features.cookieBanners.value().sectionsEnabled
    
    1509
    +    //private val cookieBannersSection: Map<CookieBannersSection, Int>
    
    1510
    +    //    get() =
    
    1511
    +    //        FxNimbus.features.cookieBanners.value().sectionsEnabled
    
    1512 1512
     
    
    1513 1513
         // IN TOR BROWSER: we want to avoid ever calling Nimbus, so we hard-code defaults
    
    1514 1514
         // for everything that would have accessed this property.
    
    ... ... @@ -1524,7 +1524,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    1524 1524
         var showSyncCFR by lazyFeatureFlagPreference(
    
    1525 1525
             appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
    
    1526 1526
             featureFlag = true,
    
    1527
    -        default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
    
    1527
    +        default = { false /* mr2022Sections[Mr2022Section.SYNC_CFR] == true */ },
    
    1528 1528
         )
    
    1529 1529
     
    
    1530 1530
         /**
    
    ... ... @@ -1533,7 +1533,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    1533 1533
         var showHomeOnboardingDialog by lazyFeatureFlagPreference(
    
    1534 1534
             appContext.getPreferenceKey(R.string.pref_key_should_show_home_onboarding_dialog),
    
    1535 1535
             featureFlag = true,
    
    1536
    -        default = { mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true },
    
    1536
    +        default = { true /* mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true */ },
    
    1537 1537
         )
    
    1538 1538
     
    
    1539 1539
         /**
    
    ... ... @@ -1703,7 +1703,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    1703 1703
          * Indicates if juno onboarding feature is enabled.
    
    1704 1704
          */
    
    1705 1705
         val junoOnboardingEnabled: Boolean
    
    1706
    -        get() = FxNimbus.features.junoOnboarding.value().enabled
    
    1706
    +        get() = false //FxNimbus.features.junoOnboarding.value().enabled
    
    1707 1707
     
    
    1708 1708
         /**
    
    1709 1709
          * Returns whether juno onboarding should be shown to the user.
    
    ... ... @@ -1712,8 +1712,9 @@ class Settings(private val appContext: Context) : PreferencesHolder {
    1712 1712
          */
    
    1713 1713
         fun shouldShowJunoOnboarding(hasUserBeenOnboarded: Boolean, isLauncherIntent: Boolean): Boolean {
    
    1714 1714
             return if (!hasUserBeenOnboarded && isLauncherIntent) {
    
    1715
    -            FxNimbus.features.junoOnboarding.recordExposure()
    
    1716
    -            junoOnboardingEnabled
    
    1715
    +            // FxNimbus.features.junoOnboarding.recordExposure()
    
    1716
    +            // junoOnboardingEnabled
    
    1717
    +            false
    
    1717 1718
             } else {
    
    1718 1719
                 false
    
    1719 1720
             }