mirror of
https://github.com/ironfox-oss/IronFox.git
synced 2026-06-11 09:44:46 -04:00
182 lines
7.2 KiB
Diff
182 lines
7.2 KiB
Diff
From 9829f6f67d26042ae009b33fcbdc7f62a5384595 Mon Sep 17 00:00:00 2001
|
|
From: Akash Yadav <itsaky01@gmail.com>
|
|
Date: Mon, 28 Apr 2025 10:43:30 +0530
|
|
Subject: [PATCH] fix(patches): update 'disable-cfrs.patch' for
|
|
'FIREFOX_138_0_BUILD1'
|
|
|
|
Signed-off-by: Akash Yadav <itsaky01@gmail.com>
|
|
---
|
|
mobile/android/fenix/app/nimbus.fml.yaml | 10 +--
|
|
.../java/org/mozilla/fenix/utils/Settings.kt | 72 ++++---------------
|
|
2 files changed, 17 insertions(+), 65 deletions(-)
|
|
|
|
diff --git a/mobile/android/fenix/app/nimbus.fml.yaml b/mobile/android/fenix/app/nimbus.fml.yaml
|
|
index 0f3e80dad2..893f23302e 100644
|
|
--- a/mobile/android/fenix/app/nimbus.fml.yaml
|
|
+++ b/mobile/android/fenix/app/nimbus.fml.yaml
|
|
@@ -103,10 +103,10 @@ features:
|
|
default:
|
|
{
|
|
"home-onboarding-dialog-existing-users": true,
|
|
- "sync-cfr": true,
|
|
+ "sync-cfr": false,
|
|
"wallpapers-selection-tool": true,
|
|
- "jump-back-in-cfr": true,
|
|
- "tcp-cfr": true,
|
|
+ "jump-back-in-cfr": false,
|
|
+ "tcp-cfr": false,
|
|
"tcp-feature": true,
|
|
}
|
|
defaults:
|
|
@@ -114,9 +114,9 @@ features:
|
|
value: {
|
|
"sections-enabled": {
|
|
"home-onboarding-dialog-existing-users": true,
|
|
- "sync-cfr": true,
|
|
+ "sync-cfr": false,
|
|
"wallpapers-selection-tool": true,
|
|
- "jump-back-in-cfr": true,
|
|
+ "jump-back-in-cfr": false,
|
|
}
|
|
}
|
|
query-parameter-stripping:
|
|
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 8e271198b0..f97994d4ba 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
|
|
@@ -210,8 +210,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
default = 0L,
|
|
)
|
|
|
|
- val canShowCfr: Boolean
|
|
- get() = (System.currentTimeMillis() - lastCfrShownTimeInMillis) > THREE_DAYS_MS
|
|
+ val canShowCfr: Boolean = false
|
|
|
|
var forceEnableZoom by booleanPreference(
|
|
appContext.getPreferenceKey(R.string.pref_key_accessibility_force_enable_zoom),
|
|
@@ -904,30 +903,16 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
/**
|
|
* Indicates if the total cookie protection CRF should be shown.
|
|
*/
|
|
- var shouldShowEraseActionCFR by lazyFeatureFlagPreference(
|
|
- appContext.getPreferenceKey(R.string.pref_key_should_show_erase_action_popup),
|
|
- featureFlag = true,
|
|
- default = { feltPrivateBrowsingEnabled },
|
|
- )
|
|
+ var shouldShowEraseActionCFR = false
|
|
|
|
/**
|
|
* Indicates if the cookie banners CRF should be shown.
|
|
*/
|
|
- var shouldShowCookieBannersCFR by lazyFeatureFlagPreference(
|
|
- appContext.getPreferenceKey(R.string.pref_key_should_show_cookie_banners_action_popup),
|
|
- featureFlag = true,
|
|
- default = { shouldShowCookieBannerUI },
|
|
- )
|
|
+ var shouldShowCookieBannersCFR = false
|
|
|
|
- var shouldShowTabSwipeCFR by booleanPreference(
|
|
- appContext.getPreferenceKey(R.string.pref_key_toolbar_tab_swipe_cfr),
|
|
- default = false,
|
|
- )
|
|
+ var shouldShowTabSwipeCFR = false
|
|
|
|
- var hasShownTabSwipeCFR by booleanPreference(
|
|
- appContext.getPreferenceKey(R.string.pref_key_toolbar_has_shown_tab_swipe_cfr),
|
|
- default = false,
|
|
- )
|
|
+ var hasShownTabSwipeCFR = true
|
|
|
|
val blockCookiesSelectionInCustomTrackingProtection by stringPreference(
|
|
key = appContext.getPreferenceKey(R.string.pref_key_tracking_protection_custom_cookies_select),
|
|
@@ -1205,23 +1190,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
private val userNeedsToVisitInstallableSites: Boolean
|
|
get() = pwaInstallableVisitCount.underMaxCount()
|
|
|
|
- val shouldShowPwaCfr: Boolean
|
|
- get() {
|
|
- if (!canShowCfr) return false
|
|
- // We only want to show this on the 3rd time a user visits a site
|
|
- if (userNeedsToVisitInstallableSites) return false
|
|
-
|
|
- // ShortcutManager::pinnedShortcuts is only available on Oreo+
|
|
- if (!userKnowsAboutPwas && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
- val manager = appContext.getSystemService(ShortcutManager::class.java)
|
|
- val alreadyHavePwaInstalled = manager != null && manager.pinnedShortcuts.size > 0
|
|
-
|
|
- // Users know about PWAs onboarding if they already have PWAs installed.
|
|
- userKnowsAboutPwas = alreadyHavePwaInstalled
|
|
- }
|
|
- // Show dialog only if user does not know abut PWAs
|
|
- return !userKnowsAboutPwas
|
|
- }
|
|
+ val shouldShowPwaCfr: Boolean = false
|
|
|
|
var userKnowsAboutPwas by booleanPreference(
|
|
appContext.getPreferenceKey(R.string.pref_key_user_knows_about_pwa),
|
|
@@ -1233,8 +1202,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
default = true,
|
|
)
|
|
|
|
- val shouldShowOpenInAppCfr: Boolean
|
|
- get() = canShowCfr && shouldShowOpenInAppBanner
|
|
+ val shouldShowOpenInAppCfr: Boolean = false
|
|
|
|
var shouldShowAutoCloseTabsBanner by booleanPreference(
|
|
appContext.getPreferenceKey(R.string.pref_key_should_show_auto_close_tabs_banner),
|
|
@@ -1675,11 +1643,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
/**
|
|
* Indicates if sync onboarding CFR should be shown.
|
|
*/
|
|
- var showSyncCFR by lazyFeatureFlagPreference(
|
|
- appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
|
|
- featureFlag = true,
|
|
- default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
|
|
- )
|
|
+ var showSyncCFR = false
|
|
|
|
/**
|
|
* Indicates if home onboarding dialog should be shown.
|
|
@@ -1887,34 +1851,22 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
/**
|
|
* Indicates if the navigation bar CFR should be displayed to the user.
|
|
*/
|
|
- var shouldShowNavigationBarCFR by booleanPreference(
|
|
- key = appContext.getPreferenceKey(R.string.pref_key_should_navbar_cfr),
|
|
- default = true,
|
|
- )
|
|
+ var shouldShowNavigationBarCFR = false
|
|
|
|
/**
|
|
* Indicates if the search bar CFR should be displayed to the user.
|
|
*/
|
|
- var shouldShowSearchBarCFR by booleanPreference(
|
|
- key = appContext.getPreferenceKey(R.string.pref_key_should_searchbar_cfr),
|
|
- default = false,
|
|
- )
|
|
+ var shouldShowSearchBarCFR = false
|
|
|
|
/**
|
|
* Indicates Navigation Bar's Navigation buttons CFR should be displayed to the user.
|
|
*/
|
|
- var shouldShowNavigationButtonsCFR by booleanPreference(
|
|
- key = appContext.getPreferenceKey(R.string.pref_key_toolbar_navigation_cfr),
|
|
- default = true,
|
|
- )
|
|
+ var shouldShowNavigationButtonsCFR = false
|
|
|
|
/**
|
|
* Indicates if the menu CFR should be displayed to the user.
|
|
*/
|
|
- var shouldShowMenuCFR by booleanPreference(
|
|
- key = appContext.getPreferenceKey(R.string.pref_key_menu_cfr),
|
|
- default = true,
|
|
- )
|
|
+ var shouldShowMenuCFR = false
|
|
|
|
/**
|
|
* Get the current mode for how https-only is enabled.
|
|
--
|
|
2.49.0
|
|
|