Files
IronFox/patches/disable-nags.patch
celenity 63a99045b4 WIP: v141.0
Signed-off-by: celenity <celenity@celenity.dev>
2025-07-22 08:21:43 -04:00

245 lines
10 KiB
Diff

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
index e5ab956ac3..4d1ef3de39 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
@@ -349,7 +349,7 @@ class OnboardingFragment : Fragment() {
}
private fun enableSearchBarCFRForNewUser() {
- requireContext().settings().shouldShowSearchBarCFR = FxNimbus.features.encourageSearchCfr.value().enabled
+ requireContext().settings().shouldShowSearchBarCFR = false
}
private fun isNotDefaultBrowser(context: Context) =
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
index 8913d9f230..7895607510 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
@@ -198,7 +198,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
)
val canShowCfr: Boolean
- get() = (System.currentTimeMillis() - lastCfrShownTimeInMillis) > THREE_DAYS_MS
+ get() = false
var forceEnableZoom by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_accessibility_force_enable_zoom),
@@ -318,7 +318,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var showWallpaperOnboarding by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_wallpapers_onboarding),
- featureFlag = true,
+ featureFlag = false,
default = { mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true },
)
@@ -351,7 +351,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var shouldShowMenuBanner by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_show_menu_banner),
default = { FxNimbus.features.menuRedesign.value().menuBanner },
- featureFlag = true,
+ featureFlag = false,
)
var defaultSearchEngineName by stringPreference(
@@ -624,7 +624,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var showFirstTimeTranslation: Boolean by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_show_first_time_translation),
- default = true,
+ default = false,
)
/**
@@ -794,12 +794,12 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* This will lead to a performance regression since that function can be expensive to call.
*/
fun checkIfFenixIsDefaultBrowserOnAppResume(): Boolean {
- val prefKey = appContext.getPreferenceKey(R.string.pref_key_default_browser)
- val isDefaultBrowserNow = isDefaultBrowserBlocking()
- val wasDefaultBrowserOnLastResume =
- this.preferences.getBoolean(prefKey, isDefaultBrowserNow)
- this.preferences.edit { putBoolean(prefKey, isDefaultBrowserNow) }
- return isDefaultBrowserNow && !wasDefaultBrowserOnLastResume
+// val prefKey = appContext.getPreferenceKey(R.string.pref_key_default_browser)
+// val isDefaultBrowserNow = isDefaultBrowserBlocking()
+// val wasDefaultBrowserOnLastResume =
+// this.preferences.getBoolean(prefKey, isDefaultBrowserNow)
+// this.preferences.edit { putBoolean(prefKey, isDefaultBrowserNow) }
+ return false
}
/**
@@ -808,12 +808,12 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
fun isDefaultBrowserBlocking(): Boolean {
val browsers = BrowsersCache.all(appContext)
- return browsers.isDefaultBrowser
+ return false
}
var reEngagementNotificationShown by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_shown),
- default = false,
+ default = true,
)
/**
@@ -836,7 +836,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var reEngagementNotificationEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_enabled),
default = { FxNimbus.features.reEngagementNotification.value().enabled },
- featureFlag = true,
+ featureFlag = false,
)
/**
@@ -844,7 +844,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
val reEngagementNotificationType: Int
get() =
- FxNimbus.features.reEngagementNotification.value().type
+ 0
val shouldUseAutoBatteryTheme by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_auto_battery_theme),
@@ -906,7 +906,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var shouldShowCookieBannersCFR by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_cookie_banners_action_popup),
- featureFlag = true,
+ featureFlag = false,
default = { shouldShowCookieBannerUI },
)
@@ -917,7 +917,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var hasShownTabSwipeCFR by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_toolbar_has_shown_tab_swipe_cfr),
- default = false,
+ default = true,
)
val blockCookiesSelectionInCustomTrackingProtection by stringPreference(
@@ -1222,12 +1222,12 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var userKnowsAboutPwas by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_user_knows_about_pwa),
- default = false,
+ default = true,
)
var shouldShowOpenInAppBanner by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_open_in_app_banner),
- default = true,
+ default = false,
)
val shouldShowOpenInAppCfr: Boolean
@@ -1235,17 +1235,17 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var shouldShowAutoCloseTabsBanner by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_auto_close_tabs_banner),
- default = true,
+ default = false,
)
var shouldShowLockPbmBanner by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_lock_pbm_banner),
- true,
+ false,
)
var shouldShowInactiveTabsOnboardingPopup by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_inactive_tabs_popup),
- default = true,
+ default = false,
)
/**
@@ -1253,7 +1253,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var hasInactiveTabsAutoCloseDialogBeenDismissed by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_has_inactive_tabs_auto_close_dialog_dismissed),
- default = false,
+ default = true,
)
/**
@@ -1674,7 +1674,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var showSyncCFR by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
- featureFlag = true,
+ featureFlag = false,
default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
)
@@ -2106,7 +2106,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var isFirstTimeEngagingWithSignup: Boolean by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_first_time_engage_with_signup),
- default = true,
+ default = false,
)
/**
@@ -2259,7 +2259,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
val shouldShowSetAsDefaultPrompt: Boolean
get() =
- (System.currentTimeMillis() - lastSetAsDefaultPromptShownTimeInMillis) >
+ false && (System.currentTimeMillis() - lastSetAsDefaultPromptShownTimeInMillis) >
DAYS_BETWEEN_DEFAULT_BROWSER_PROMPTS * ONE_DAY_MS &&
numberOfSetAsDefaultPromptShownTimes < MAX_NUMBER_OF_DEFAULT_BROWSER_PROMPTS &&
coldStartsBetweenSetAsDefaultPrompts >= APP_COLD_STARTS_TO_SHOW_DEFAULT_PROMPT
@@ -2422,7 +2422,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var hasCompletedSetupStepToolbar by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_setup_step_toolbar),
- default = false,
+ default = true,
)
/**
@@ -2430,7 +2430,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var hasCompletedSetupStepTheme by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_setup_step_theme),
- default = false,
+ default = true,
)
/**
@@ -2438,16 +2438,16 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var hasCompletedSetupStepExtensions by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_setup_step_extensions),
- default = false,
+ default = true,
)
/**
* Indicates if this is the default browser.
*/
- var isDefaultBrowser by booleanPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_default_browser),
- default = false,
- )
+ var isDefaultBrowser = true
+// key = appContext.getPreferenceKey(R.string.pref_key_default_browser),
+// default = false,
+// )
/**
* Indicates whether or not to show the checklist feature.
@@ -2458,7 +2458,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
FxNimbus.features.setupChecklist.value().enabled &&
canShowAddSearchWidgetPrompt(AppWidgetManager.getInstance(appContext))
},
- featureFlag = true,
+ featureFlag = false,
)
/**