mirror of
https://github.com/ironfox-oss/IronFox.git
synced 2026-08-01 18:36:35 -04:00
feat: Add mechanism to directly override and set the default values of Fenix preferences
This provides support for a mechanism to easily configure and override Fenix UI preferences, similar to how we override Gecko preferences with `ironfox.cfg` - the prefs and values we're setting specifically can be seen at `IFPrefs.kt` This significantly lowers the burden of maintenance (especially since we also override Nimbus directly as well), as we no longer need to make a patch just to modify a setting value... (We're also setting the preference keys directly from the R.string values - so if a preference is removed or changed in the future, we'll know, as it'll cause the build to fail) Signed-off-by: celenity <celenity@celenity.dev>
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/PhoneFeature.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/PhoneFeature.kt
|
||||
index 6012a322b8fb..48e6a97eff24 100644
|
||||
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/PhoneFeature.kt
|
||||
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/PhoneFeature.kt
|
||||
@@ -168,7 +168,11 @@ enum class PhoneFeature(val androidPermissionsList: Array<String>) : Parcelable
|
||||
private fun getDefault(): SitePermissionsRules.Action {
|
||||
return when (this) {
|
||||
AUTOPLAY_AUDIBLE -> SitePermissionsRules.Action.BLOCKED
|
||||
- AUTOPLAY_INAUDIBLE -> SitePermissionsRules.Action.ALLOWED
|
||||
+ AUTOPLAY_INAUDIBLE -> SitePermissionsRules.Action.BLOCKED
|
||||
+ LOCAL_DEVICE_ACCESS -> SitePermissionsRules.Action.BLOCKED
|
||||
+ LOCAL_NETWORK_ACCESS -> SitePermissionsRules.Action.BLOCKED
|
||||
+ LOCATION -> SitePermissionsRules.Action.BLOCKED
|
||||
+ NOTIFICATION -> SitePermissionsRules.Action.BLOCKED
|
||||
else -> SitePermissionsRules.Action.ASK_TO_ALLOW
|
||||
}
|
||||
}
|
||||
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 83e0f40483..0a295fc18e 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
|
||||
@@ -1752,7 +1752,7 @@ class Settings(
|
||||
* either [AUTOPLAY_ALLOW_ALL] or [AUTOPLAY_BLOCK_ALL]. Because of this, we are forced to save
|
||||
* the user selected setting as well.
|
||||
*/
|
||||
- fun getAutoplayUserSetting() = preferences.getInt(AUTOPLAY_USER_SETTING, AUTOPLAY_BLOCK_AUDIBLE)
|
||||
+ fun getAutoplayUserSetting() = preferences.getInt(AUTOPLAY_USER_SETTING, AUTOPLAY_BLOCK_ALL)
|
||||
|
||||
private fun getSitePermissionsPhoneFeatureAutoplayAction(
|
||||
feature: PhoneFeature,
|
||||
@@ -1771,9 +1771,9 @@ class Settings(
|
||||
|
||||
fun getSitePermissionsCustomSettingsRules(): SitePermissionsRules {
|
||||
return SitePermissionsRules(
|
||||
- notification = getSitePermissionsPhoneFeatureAction(PhoneFeature.NOTIFICATION),
|
||||
+ notification = getSitePermissionsPhoneFeatureAction(feature = PhoneFeature.NOTIFICATION, default = Action.BLOCKED),
|
||||
microphone = getSitePermissionsPhoneFeatureAction(PhoneFeature.MICROPHONE),
|
||||
- location = getSitePermissionsPhoneFeatureAction(PhoneFeature.LOCATION),
|
||||
+ location = getSitePermissionsPhoneFeatureAction(feature = PhoneFeature.LOCATION, default = Action.BLOCKED),
|
||||
camera = getSitePermissionsPhoneFeatureAction(PhoneFeature.CAMERA),
|
||||
autoplayAudible = getSitePermissionsPhoneFeatureAutoplayAction(
|
||||
feature = PhoneFeature.AUTOPLAY_AUDIBLE,
|
||||
@@ -1781,13 +1781,13 @@ class Settings(
|
||||
),
|
||||
autoplayInaudible = getSitePermissionsPhoneFeatureAutoplayAction(
|
||||
feature = PhoneFeature.AUTOPLAY_INAUDIBLE,
|
||||
- default = AutoplayAction.ALLOWED,
|
||||
+ default = AutoplayAction.BLOCKED,
|
||||
),
|
||||
persistentStorage = getSitePermissionsPhoneFeatureAction(PhoneFeature.PERSISTENT_STORAGE),
|
||||
crossOriginStorageAccess = getSitePermissionsPhoneFeatureAction(PhoneFeature.CROSS_ORIGIN_STORAGE_ACCESS),
|
||||
mediaKeySystemAccess = getSitePermissionsPhoneFeatureAction(PhoneFeature.MEDIA_KEY_SYSTEM_ACCESS),
|
||||
- localDeviceAccess = getSitePermissionsPhoneFeatureAction(PhoneFeature.LOCAL_DEVICE_ACCESS),
|
||||
- localNetworkAccess = getSitePermissionsPhoneFeatureAction(PhoneFeature.LOCAL_NETWORK_ACCESS),
|
||||
+ localDeviceAccess = getSitePermissionsPhoneFeatureAction(feature = PhoneFeature.LOCAL_DEVICE_ACCESS, default = Action.BLOCKED),
|
||||
+ localNetworkAccess = getSitePermissionsPhoneFeatureAction(feature = PhoneFeature.LOCAL_NETWORK_ACCESS, default = Action.BLOCKED),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 27 Jun 2026 20:11:41 +0000
|
||||
Subject: [PATCH] feat: Disable AI Controls
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
diff --git a/mobile/android/fenix/app/src/main/AndroidManifest.xml b/mobile/android/fenix/app/src/main/AndroidManifest.xml
|
||||
index 742522506d..d881cfe5a6 100644
|
||||
--- a/mobile/android/fenix/app/src/main/AndroidManifest.xml
|
||||
@@ -11,16 +18,4 @@ index 742522506d..d881cfe5a6 100644
|
||||
<data android:host="settings_delete_browsing_data"/>
|
||||
<data android:host="settings_logins"/>
|
||||
<data android:host="settings_notifications"/>
|
||||
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 83e0f40483..f15c7488c1 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
|
||||
@@ -2769,7 +2769,7 @@ class Settings(
|
||||
|
||||
var aiControlsFeatureFlagEnabled by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_enable_ai_controls),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
var importBookmarksFeatureFlagEnabled by booleanPreference(
|
||||
--
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
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 83e0f40483..7c1bea016e 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
|
||||
@@ -1608,7 +1608,7 @@ class Settings(
|
||||
|
||||
val shouldAutocompleteInAwesomebar by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_enable_autocomplete_urls),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
var defaultTopSitesAdded by booleanPreference(
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
index 84f47aa47e78..4c9570971c25 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
@@ -104,7 +104,7 @@
|
||||
android:title="@string/preferences_show_voice_search" />
|
||||
<SwitchPreference
|
||||
app:iconSpaceReserved="false"
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_enable_autocomplete_urls"
|
||||
android:title="@string/preferences_enable_autocomplete_urls" />
|
||||
</PreferenceCategory>
|
||||
21
patches/fenix-disable-cfrs.patch
Normal file
21
patches/fenix-disable-cfrs.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 14 Feb 2026 04:05:55 +0000
|
||||
Subject: [PATCH] feat: Disable contextual feature recommendations (CFRs)
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
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 e1eedc43d242..34be9c5507c7 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
|
||||
@@ -361,7 +361,7 @@ class Settings(
|
||||
)
|
||||
|
||||
val canShowCfr: Boolean
|
||||
- get() = (System.currentTimeMillis() - lastCfrShownTimeInMillis) > THREE_DAYS_MS
|
||||
+ get() = false
|
||||
|
||||
val cfrPopupsEnabled by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_cfr_popups_enabled),
|
||||
--
|
||||
@@ -1,3 +1,10 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 27 Jun 2026 20:11:41 +0000
|
||||
Subject: [PATCH] feat: Disable Contile
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/HomeSettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/HomeSettingsFragment.kt
|
||||
index 579db37cf75a..e2869c0a37e3 100644
|
||||
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/HomeSettingsFragment.kt
|
||||
@@ -10,16 +17,4 @@ index 579db37cf75a..e2869c0a37e3 100644
|
||||
isChecked = fenixSettings.showContileFeature
|
||||
onPreferenceChangeListener = createMetricPreferenceChangeListener("contile")
|
||||
}
|
||||
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 83e0f40483..09a6f1582c 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
|
||||
@@ -2188,7 +2188,7 @@ class Settings(
|
||||
*/
|
||||
var showContileFeature by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_enable_contile),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
--
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
From ca75f2556d3c43a290ce5c0030670f7b30467fae Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Tue, 17 Feb 2026 03:44:28 +0000
|
||||
Subject: [PATCH] fix: Disable crash reporting
|
||||
Subject: [PATCH] feat: Disable crash reporting
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
.../fenix/app/src/main/AndroidManifest.xml | 4 ++--
|
||||
.../java/org/mozilla/fenix/FenixApplication.kt | 16 ++++++++--------
|
||||
.../fenix/components/BackgroundServices.kt | 2 +-
|
||||
.../fenix/debugsettings/crashtools/CrashTools.kt | 8 ++++----
|
||||
.../debugsettings/navigation/DebugDrawerRoute.kt | 8 ++++----
|
||||
.../store/DebugDrawerNavigationMiddleware.kt | 2 +-
|
||||
.../search/BrowserToolbarSearchMiddleware.kt | 4 ++--
|
||||
.../java/org/mozilla/fenix/utils/Settings.kt | 4 ++--
|
||||
8 files changed, 26 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/mobile/android/fenix/app/build.gradle b/mobile/android/fenix/app/build.gradle
|
||||
index ad28bfb8c8ff..3f3a29843fcb 100644
|
||||
--- a/mobile/android/fenix/app/build.gradle
|
||||
@@ -199,28 +189,4 @@ index 788cee797c10..61fb08c6e103 100644
|
||||
|
||||
"about:addons" -> {
|
||||
navController.navigate(
|
||||
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 83e0f40483..1b4526fd7e 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
|
||||
@@ -607,7 +607,7 @@ class Settings(
|
||||
|
||||
var crashReportChoice by stringPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_crash_reporting_choice),
|
||||
- default = CrashReportOption.Ask.toString(),
|
||||
+ default = CrashReportOption.Never.toString(),
|
||||
)
|
||||
|
||||
val isRemoteDebuggingEnabled by booleanPreference(
|
||||
@@ -1019,7 +1019,7 @@ class Settings(
|
||||
*/
|
||||
var crashPullNeverShowAgain: Boolean by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_crash_pull_never_show_again),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
@VisibleForTesting
|
||||
--
|
||||
2.53.0
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
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 83e0f40483..32d1facd95 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
|
||||
@@ -2712,7 +2712,7 @@ class Settings(
|
||||
*/
|
||||
var isEmailMaskSuggestionEnabled by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_email_mask_suggestion),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -1,18 +1,13 @@
|
||||
From 3fd4d9559b1bae6eaced62ea83dc22dbd4c4df97 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Tue, 17 Feb 2026 04:11:12 +0000
|
||||
Subject: [PATCH] fix: Disable Firefox Suggest by default, remove unwanted
|
||||
Firefox Suggest UI elements, and ensure that Fsuggestions from Firefox
|
||||
Suggest are only queried if suggestions are actually enabled by the user
|
||||
Subject: [PATCH] feat: Disable Firefox Suggest
|
||||
|
||||
Disables Firefox Suggest by default, removes unwanted Firefox Suggest UI elements, and ensure that suggestions from Firefox Suggest are
|
||||
only queried if the user actually enables suggestions
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
.../java/org/mozilla/fenix/FenixApplication.kt | 4 ++--
|
||||
.../SearchSuggestionsProvidersBuilder.kt | 14 +++++++-------
|
||||
.../fenix/settings/search/SearchEngineFragment.kt | 2 +-
|
||||
.../main/java/org/mozilla/fenix/utils/Settings.kt | 6 +++---
|
||||
4 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
|
||||
index 8dd1374d2d94f..bd1322dfc5ab3 100644
|
||||
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
|
||||
@@ -115,28 +110,4 @@ index c0fb12426e4d..dd229dcd1875 100644
|
||||
}
|
||||
requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
|
||||
isVisible = context.settings().enableFxSuggest
|
||||
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 83e0f40483..5babad2aa6 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
|
||||
@@ -2672,7 +2672,7 @@ class Settings(
|
||||
var showSponsoredSuggestions by lazyFeatureFlagBooleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_show_sponsored_suggestions),
|
||||
defaultValue = { enableFxSuggest },
|
||||
- featureFlag = FeatureFlags.FX_SUGGEST,
|
||||
+ featureFlag = false,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -2683,7 +2683,7 @@ class Settings(
|
||||
@Suppress("DEPRECATION")
|
||||
var showNonSponsoredSuggestions by lazyFeatureFlagBooleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_show_nonsponsored_suggestions),
|
||||
- defaultValue = { enableFxSuggest },
|
||||
+ defaultValue = { false },
|
||||
featureFlag = FeatureFlags.FX_SUGGEST,
|
||||
)
|
||||
|
||||
--
|
||||
2.53.0
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
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 83e0f40483..782552ea6e 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
|
||||
@@ -823,7 +823,7 @@ class Settings(
|
||||
|
||||
val shouldShowHistorySuggestions by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_search_browsing_history),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
val shouldShowBookmarkSuggestions by booleanPreference(
|
||||
@@ -1634,7 +1634,7 @@ class Settings(
|
||||
*/
|
||||
internal var shouldShowRecentSearchSuggestions by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_recent_search_suggestions),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
var showSearchSuggestionsInPrivateOnboardingFinished by booleanPreference(
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
index 84f47aa47e78..9e3154a2701e 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
@@ -46,7 +46,7 @@
|
||||
app:iconSpaceReserved="false" />
|
||||
<SwitchPreference
|
||||
app:iconSpaceReserved="false"
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_show_recent_search_suggestions"
|
||||
android:title="@string/preferences_show_recent_search_suggestions" />
|
||||
</PreferenceCategory>
|
||||
@@ -58,7 +58,7 @@
|
||||
android:layout="@layout/preference_category_no_icon_style">
|
||||
<SwitchPreference
|
||||
app:iconSpaceReserved="false"
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_search_browsing_history"
|
||||
android:title='@string/preferences_search_browsing_history' />
|
||||
<SwitchPreference
|
||||
@@ -1,126 +0,0 @@
|
||||
From c1dc2ed2db9ba760aebdd3a49abcd329717516ad Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 14 Feb 2026 04:05:55 +0000
|
||||
Subject: [PATCH] fix: Disable contextual feature recommendations,
|
||||
suggestions, and unwanted nags
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
.../java/org/mozilla/fenix/utils/Settings.kt | 32 +++++++++----------
|
||||
1 file changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
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 83e0f40483..cf447ef5cc 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
|
||||
@@ -383,7 +383,7 @@ class Settings(
|
||||
)
|
||||
|
||||
val canShowCfr: Boolean
|
||||
- get() = (System.currentTimeMillis() - lastCfrShownTimeInMillis) > THREE_DAYS_MS
|
||||
+ get() = false
|
||||
|
||||
val cfrPopupsEnabled by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_cfr_popups_enabled),
|
||||
@@ -533,7 +533,7 @@ class Settings(
|
||||
*/
|
||||
var showWallpaperOnboarding by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_wallpapers_onboarding),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
var openLinksInAPrivateTab by booleanPreference(
|
||||
@@ -1002,7 +1002,7 @@ class Settings(
|
||||
*/
|
||||
var showFirstTimeTranslation: Boolean by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_first_time_translation),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -1284,7 +1284,7 @@ class Settings(
|
||||
*/
|
||||
var shouldShowCookieBannersCFR by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_should_show_cookie_banners_action_popup),
|
||||
- default = { shouldShowCookieBannerUI },
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
var shouldShowTabSwipeCFR by booleanPreference(
|
||||
@@ -1294,7 +1294,7 @@ class Settings(
|
||||
|
||||
var hasShownTabSwipeCFR by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_toolbar_has_shown_tab_swipe_cfr),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
val blockCookiesSelectionInCustomTrackingProtection by stringPreference(
|
||||
@@ -1673,12 +1673,12 @@ class Settings(
|
||||
|
||||
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
|
||||
@@ -1686,17 +1686,17 @@ class Settings(
|
||||
|
||||
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,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -1704,7 +1704,7 @@ class Settings(
|
||||
*/
|
||||
var hasInactiveTabsAutoCloseDialogBeenDismissed by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_has_inactive_tabs_auto_close_dialog_dismissed),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -2661,7 +2661,7 @@ class Settings(
|
||||
*/
|
||||
var isFirstTimeEngagingWithSignup: Boolean by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_first_time_engage_with_signup),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -2720,7 +2720,7 @@ class Settings(
|
||||
*/
|
||||
var shouldShowEmailMaskCfr by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_should_show_email_mask_cfr),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
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 83e0f40483..cd2ce98940 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
|
||||
@@ -769,7 +769,7 @@ class Settings(
|
||||
*/
|
||||
var isRolloutsEnabled by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_rollouts),
|
||||
- default = { appContext.components.nimbus.sdk.rolloutParticipation },
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -1,18 +1,12 @@
|
||||
From 9c9d314070b46893e93d23f29f6e725343e746d9 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Tue, 17 Feb 2026 05:22:45 +0000
|
||||
Subject: [PATCH] fix: Disable Nimbus Experimentation and A/B testing
|
||||
Subject: [PATCH] feat: Disable Nimbus
|
||||
|
||||
Disables Nimbus Experimentation and A/B testing
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
mobile/android/fenix/app/nimbus.fml.yaml | 18 +++++++++---------
|
||||
.../java/org/mozilla/fenix/FenixApplication.kt | 10 +++++-----
|
||||
.../java/org/mozilla/fenix/HomeActivity.kt | 2 +-
|
||||
.../mozilla/fenix/settings/SettingsFragment.kt | 6 +++---
|
||||
.../DefaultLocaleSettingsController.kt | 6 +++---
|
||||
.../java/org/mozilla/fenix/utils/Settings.kt | 4 ++--
|
||||
6 files changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/mobile/android/fenix/app/nimbus.fml.yaml b/mobile/android/fenix/app/nimbus.fml.yaml
|
||||
index 8c61dbb0291c..fbe56f557ec0 100644
|
||||
--- a/mobile/android/fenix/app/nimbus.fml.yaml
|
||||
@@ -136,19 +130,4 @@ index 4cd5212dea9b..3b4ada79b960 100644
|
||||
recreateActivity()
|
||||
}
|
||||
|
||||
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 83e0f40483..3a43fec1a0 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
|
||||
@@ -422,7 +422,7 @@ class Settings(
|
||||
|
||||
var nimbusExperimentsFetched by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_nimbus_experiments_fetched),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
var utmParamsKnown by booleanPreference(
|
||||
--
|
||||
2.53.0
|
||||
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
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 83e0f40483..47a34b8434 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
|
||||
@@ -1836,12 +1836,12 @@ class Settings(
|
||||
|
||||
var shouldPromptToSaveLogins by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_save_logins),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
var shouldAutofillLogins by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_autofill_logins),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -2149,7 +2149,7 @@ class Settings(
|
||||
*/
|
||||
var shouldAutofillCreditCardDetails by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_credit_cards_save_and_autofill_cards),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -2170,7 +2170,7 @@ class Settings(
|
||||
*/
|
||||
var shouldAutofillAddressDetails by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_addresses_save_and_autofill_addresses),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/autofill_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/autofill_preferences.xml
|
||||
index 57ec1a257ea4..2af019c8cb6e 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/autofill_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/autofill_preferences.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
android:title="@string/preferences_addresses">
|
||||
|
||||
<SwitchPreference
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_addresses_save_and_autofill_addresses"
|
||||
android:summary="@string/preferences_addresses_save_and_autofill_addresses_summary_2"
|
||||
android:title="@string/preferences_addresses_save_and_autofill_addresses_2" />
|
||||
@@ -28,7 +28,7 @@
|
||||
android:layout="@layout/preference_cat_style"
|
||||
android:title="@string/preferences_credit_cards_2">
|
||||
<SwitchPreference
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_credit_cards_save_and_autofill_cards"
|
||||
android:summary="@string/preferences_credit_cards_save_and_autofill_cards_summary_2"
|
||||
android:title="@string/preferences_credit_cards_save_and_autofill_cards_2" />
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/credit_cards_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/credit_cards_preferences.xml
|
||||
index 00caf8e1bb46..b4efbb89a535 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/credit_cards_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/credit_cards_preferences.xml
|
||||
@@ -5,7 +5,7 @@
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<SwitchPreference
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_credit_cards_save_and_autofill_cards"
|
||||
android:summary="@string/preferences_credit_cards_save_and_autofill_cards_summary_2"
|
||||
android:title="@string/preferences_credit_cards_save_and_autofill_cards_2" />
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/logins_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/logins_preferences.xml
|
||||
index 1a8810eca78d..1f3ad7129518 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/logins_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/logins_preferences.xml
|
||||
@@ -9,7 +9,7 @@
|
||||
android:summary="@string/preferences_passwords_save_logins_ask_to_save"
|
||||
android:title="@string/preferences_passwords_save_logins_2" />
|
||||
<SwitchPreference
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_autofill_logins"
|
||||
android:title="@string/preferences_passwords_autofill2"
|
||||
android:summary="@string/preferences_passwords_autofill_description" />
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/save_logins_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/save_logins_preferences.xml
|
||||
index 3fc38f207008..1c880402843e 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/save_logins_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/save_logins_preferences.xml
|
||||
@@ -4,11 +4,11 @@
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<org.mozilla.fenix.settings.RadioButtonPreference
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_save_logins"
|
||||
android:title="@string/preferences_passwords_save_logins_ask_to_save" />
|
||||
<org.mozilla.fenix.settings.RadioButtonPreference
|
||||
- android:defaultValue="false"
|
||||
+ android:defaultValue="true"
|
||||
android:key="@string/pref_key_never_save_logins"
|
||||
android:title="@string/preferences_passwords_save_logins_never_save" />
|
||||
</PreferenceScreen>
|
||||
@@ -1,49 +0,0 @@
|
||||
From 38c987f71933024453b04d5211611c80f127dbb9 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Tue, 17 Feb 2026 05:25:17 +0000
|
||||
Subject: [PATCH] fix: Disable search suggestions by default
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
.../app/src/main/java/org/mozilla/fenix/utils/Settings.kt | 4 ++--
|
||||
.../app/src/main/res/xml/search_settings_preferences.xml | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
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 83e0f40483..a0285f57dc 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
|
||||
@@ -1603,7 +1603,7 @@ class Settings(
|
||||
|
||||
val shouldShowSearchSuggestions by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_search_suggestions),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
val shouldAutocompleteInAwesomebar by booleanPreference(
|
||||
@@ -1639,7 +1639,7 @@ class Settings(
|
||||
|
||||
var showSearchSuggestionsInPrivateOnboardingFinished by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_search_suggestions_in_private_onboarding),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
fun incrementVisitedInstallableCount() = pwaInstallableVisitCount.increment()
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
index 84f47aa47e78..fffc63c44cfe 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
@@ -27,7 +27,7 @@
|
||||
android:layout="@layout/preference_category_no_icon_style">
|
||||
<SwitchPreference
|
||||
app:iconSpaceReserved="false"
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:key="@string/pref_key_show_search_suggestions"
|
||||
android:title="@string/preferences_show_search_suggestions" />
|
||||
<CheckBoxPreference
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 27 Jun 2026 20:11:41 +0000
|
||||
Subject: [PATCH] feat: Disable Firefox Sync engines by default
|
||||
|
||||
Disables Firefox Sync engines by default, to ensure that users are in control and can decide what data they'd like to sync with Firefox Sync, if any
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/account/AccountSettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/account/AccountSettingsFragment.kt
|
||||
index 76ab6e5b0072..5ae6093e034d 100644
|
||||
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/account/AccountSettingsFragment.kt
|
||||
@@ -37,19 +46,6 @@ index 76ab6e5b0072..5ae6093e034d 100644
|
||||
}
|
||||
}
|
||||
|
||||
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 83e0f40483..428179fc63 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
|
||||
@@ -2094,7 +2094,7 @@ class Settings(
|
||||
@Suppress("DEPRECATION")
|
||||
var isAddressSyncEnabled by featureFlagBooleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_enable_address_sync),
|
||||
- defaultValue = true,
|
||||
+ defaultValue = false,
|
||||
featureFlag = isAddressFeatureEnabled(appContext),
|
||||
)
|
||||
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/account_settings_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/account_settings_preferences.xml
|
||||
index 300331efb528..f1cbf8ea995b 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/account_settings_preferences.xml
|
||||
@@ -99,3 +95,4 @@ index 300331efb528..f1cbf8ea995b 100644
|
||||
android:visible="false"
|
||||
android:key="@string/pref_key_sync_address"
|
||||
android:layout="@layout/checkbox_left_preference"
|
||||
--
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 27 Jun 2026 20:11:41 +0000
|
||||
Subject: [PATCH] feat: Disable telemetry
|
||||
|
||||
Disables telemetry at build-time and removes various data reporting mechanisms
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
diff --git a/mobile/android/fenix/app/build.gradle b/mobile/android/fenix/app/build.gradle
|
||||
index ad28bfb8c8ff..4f3136c67a91 100644
|
||||
--- a/mobile/android/fenix/app/build.gradle
|
||||
@@ -120,16 +129,4 @@ index 83a940b91e88..41b1288c9280 100644
|
||||
|
||||
fun Context.asActivity() = (this as? ContextThemeWrapper)?.baseContext as? Activity
|
||||
?: this as? Activity
|
||||
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 83e0f40483..c47314c0cf 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
|
||||
@@ -617,7 +617,7 @@ class Settings(
|
||||
|
||||
var isTelemetryEnabled by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_telemetry),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
var isMarketingTelemetryEnabled by booleanPreference(
|
||||
--
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
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 83e0f40483..a9734a9f48 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
|
||||
@@ -1626,7 +1626,7 @@ class Settings(
|
||||
*/
|
||||
internal var trendingSearchSuggestionsEnabled by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_trending_search_suggestions),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
/**
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
index 84f47aa47e78..35d76df61bf2 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
|
||||
@@ -38,7 +38,7 @@
|
||||
android:title="@string/preferences_show_search_suggestions_in_private"
|
||||
app:iconSpaceReserved="false" />
|
||||
<CheckBoxPreference
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:dependency="@string/pref_key_show_search_suggestions"
|
||||
android:key="@string/pref_key_show_trending_search_suggestions"
|
||||
android:layout="@layout/checkbox_left_preference"
|
||||
@@ -1,13 +0,0 @@
|
||||
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 83e0f40483b7..37677c52bbc9 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
|
||||
@@ -2458,7 +2458,7 @@ class Settings(
|
||||
*/
|
||||
var shouldShowCustomTabExtensions by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_should_show_custom_tab_extensions),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -1,25 +0,0 @@
|
||||
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 83e0f40483b7..9314bdf62d59 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
|
||||
@@ -2982,9 +2982,9 @@ class Settings(
|
||||
* - 3: Maximum protection
|
||||
* - 5: DoH is disabled
|
||||
*/
|
||||
- private var trrMode by intPreference(
|
||||
+ var trrMode by intPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_doh_settings_mode),
|
||||
- default = DOH_SETTINGS_DEFAULT,
|
||||
+ default = DOH_SETTINGS_MAX,
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -3002,7 +3002,7 @@ class Settings(
|
||||
*/
|
||||
val dohDefaultProviderUrl by stringPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_doh_default_provider_uri),
|
||||
- default = CLOUDFLARE_URI,
|
||||
+ default = "https://base.dns.mullvad.net/dns-query",
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -1,48 +0,0 @@
|
||||
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 83e0f40483b7..61833cefeabf 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
|
||||
@@ -1146,10 +1146,10 @@ class Settings(
|
||||
default = false,
|
||||
)
|
||||
|
||||
- var shouldUseTrackingProtection by booleanPreference(
|
||||
- appContext.getPreferenceKey(R.string.pref_key_tracking_protection),
|
||||
+ var shouldUseTrackingProtection = true
|
||||
+/* appContext.getPreferenceKey(R.string.pref_key_tracking_protection),
|
||||
default = true,
|
||||
- )
|
||||
+ ) */
|
||||
|
||||
var shouldUseTrackingProtectionDatabase by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_database_status),
|
||||
@@ -1212,20 +1212,20 @@ class Settings(
|
||||
default = false,
|
||||
)
|
||||
|
||||
- val useStandardTrackingProtection by booleanPreference(
|
||||
- appContext.getPreferenceKey(R.string.pref_key_tracking_protection_standard_option),
|
||||
+ val useStandardTrackingProtection = false
|
||||
+/* appContext.getPreferenceKey(R.string.pref_key_tracking_protection_standard_option),
|
||||
true,
|
||||
- )
|
||||
+ ) */
|
||||
|
||||
- val useStrictTrackingProtection by booleanPreference(
|
||||
- appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_default),
|
||||
+ val useStrictTrackingProtection = true
|
||||
+/* appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_default),
|
||||
false,
|
||||
- )
|
||||
+ ) */
|
||||
|
||||
- val useCustomTrackingProtection by booleanPreference(
|
||||
- appContext.getPreferenceKey(R.string.pref_key_tracking_protection_custom_option),
|
||||
+ val useCustomTrackingProtection = false
|
||||
+/* appContext.getPreferenceKey(R.string.pref_key_tracking_protection_custom_option),
|
||||
false,
|
||||
- )
|
||||
+ ) */
|
||||
|
||||
var strictAllowListBaselineTrackingProtection by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_allow_list_baseline),
|
||||
@@ -1,13 +0,0 @@
|
||||
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 83e0f40483b7..5973dee86261 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
|
||||
@@ -1133,7 +1133,7 @@ class Settings(
|
||||
|
||||
var shouldUseHttpsOnly by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_https_only),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
var shouldUseHttpsOnlyInAllTabs by booleanPreference(
|
||||
@@ -1,26 +0,0 @@
|
||||
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 83e0f40483b7..099aa373effe 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
|
||||
@@ -397,7 +397,7 @@ class Settings(
|
||||
|
||||
var forceEnableZoom by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_accessibility_force_enable_zoom),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
var adjustCampaignId by stringPreference(
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/accessibility_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/accessibility_preferences.xml
|
||||
index a810f76208c7..adba5368b63b 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/accessibility_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/accessibility_preferences.xml
|
||||
@@ -24,7 +24,7 @@
|
||||
app:seekBarIncrement="1"
|
||||
app:showSeekBarValue="true" />
|
||||
<SwitchPreference
|
||||
- android:defaultValue="false"
|
||||
+ android:defaultValue="true"
|
||||
android:key="@string/pref_key_accessibility_force_enable_zoom"
|
||||
android:summary="@string/preference_accessibility_force_enable_zoom_summary"
|
||||
android:title="@string/preference_accessibility_force_enable_zoom"
|
||||
@@ -1,8 +1,17 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 27 Jun 2026 20:11:41 +0000
|
||||
Subject: [PATCH] feat: IronFox UI settings - Collections
|
||||
|
||||
Adds support for a UI setting to enable/disable the "Collections" functionality
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
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 83e0f40483b7..dbfdd94918a2 100644
|
||||
index e1eedc43d242..0ba3068b54e7 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
|
||||
@@ -263,8 +263,10 @@ class Settings(
|
||||
@@ -251,8 +251,10 @@ class Settings(
|
||||
/**
|
||||
* Indicates whether or not the "Collections" section should be shown on the home screen.
|
||||
*/
|
||||
@@ -15,12 +24,4 @@ index 83e0f40483b7..dbfdd94918a2 100644
|
||||
|
||||
/**
|
||||
* Indicates whether or not the Firefox Japan Guide default site should be shown.
|
||||
@@ -595,7 +597,7 @@ class Settings(
|
||||
|
||||
var showCollectionsPlaceholderOnHome by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_show_collections_placeholder_home),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
val isCrashReportingEnabled: Boolean
|
||||
--
|
||||
|
||||
@@ -1,17 +1,32 @@
|
||||
From 75a3b7b848d59f749f5e977550bd84247024bacb Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Tue, 17 Feb 2026 05:35:54 +0000
|
||||
Subject: [PATCH] feat: add support for IronFox UI settings
|
||||
Subject: [PATCH] feat: IronFox UI settings
|
||||
|
||||
Adds support for IronFox-specific UI settings
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
.../java/org/mozilla/fenix/components/Core.kt | 2 ++
|
||||
.../fenix/settings/SettingsFragment.kt | 15 ++++++++++++++
|
||||
.../java/org/mozilla/fenix/utils/Settings.kt | 4 ++++
|
||||
.../app/src/main/res/navigation/nav_graph.xml | 11 ++++++++++
|
||||
.../app/src/main/res/xml/preferences.xml | 20 +++++++++++++++++--
|
||||
5 files changed, 50 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
|
||||
index 7a166ddc83aae..07836fc3392b4 100644
|
||||
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
|
||||
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
|
||||
@@ -145,6 +145,7 @@ import java.util.Date
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.math.roundToLong
|
||||
import mozilla.components.support.AppServicesInitializer.Config as AppServicesConfig
|
||||
+import org.ironfoxoss.ironfox.utils.IFPrefs
|
||||
|
||||
private const val RAM_THRESHOLD_MEGABYTES = 1024
|
||||
private const val BYTES_TO_MEGABYTES_CONVERSION = 1024.0 * 1024.0
|
||||
@@ -240,6 +241,7 @@ open class FenixApplication : Application(), Provider, ThemeProvider {
|
||||
// Start loading the SharedPreferences file from disk on a background thread immediately.
|
||||
applicationScope.launch(IO) {
|
||||
applicationContext.getSharedPreferences(Settings.FENIX_PREFERENCES, MODE_PRIVATE)
|
||||
+ IFPrefs.setPrefs(applicationContext)
|
||||
}
|
||||
|
||||
// Initialization is split into two phases based on if libmegazord is fully initialized.
|
||||
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
|
||||
index 5cc1da059f7d..517c235062dd 100644
|
||||
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
|
||||
@@ -171,5 +186,3 @@ index 243eddddd9a3..5963a7073099 100644
|
||||
android:title="@string/preferences_category_about"
|
||||
app:iconSpaceReserved="false"
|
||||
--
|
||||
2.53.0
|
||||
|
||||
|
||||
@@ -1,20 +1,12 @@
|
||||
From 56d6d6bcf2da868fb5f39e736b49a071e6a7ad5e Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Tue, 17 Feb 2026 03:35:42 +0000
|
||||
Subject: [PATCH] fix: Remove proprietary, tracking, and other unwanted
|
||||
libraries from Fenix
|
||||
Subject: [PATCH] feat: Liberate Fenix
|
||||
|
||||
Removes proprietary, tracking, and other unwanted libraries/functionality from Fenix
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
mobile/android/fenix/app/build.gradle | 20 +++++------
|
||||
mobile/android/fenix/app/proguard-rules.pro | 4 +--
|
||||
.../fenix/app/src/main/AndroidManifest.xml | 14 ++++----
|
||||
.../mozilla/fenix/components/Components.kt | 36 +++++++++----------
|
||||
.../settings/SecretDebugSettingsFragment.kt | 4 +--
|
||||
.../fenix/settings/SettingsFragment.kt | 2 +-
|
||||
.../java/org/mozilla/fenix/utils/Settings.kt | 2 +-
|
||||
7 files changed, 46 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/mobile/android/fenix/app/build.gradle b/mobile/android/fenix/app/build.gradle
|
||||
index ad28bfb8c8ff..baa5656a3613 100644
|
||||
--- a/mobile/android/fenix/app/build.gradle
|
||||
@@ -416,19 +408,4 @@ index f6ccbddae057..1c910e84017d 100644
|
||||
utmTerm: ${settings.utmTerm}
|
||||
utmMedium: ${settings.utmMedium}
|
||||
utmSource: ${settings.utmSource}
|
||||
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 83e0f40483b7..1e9f892b6018 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
|
||||
@@ -2293,7 +2293,7 @@ class Settings(
|
||||
*/
|
||||
var shouldShowMarketingOnboarding by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_should_show_marketing_onboarding),
|
||||
- default = true,
|
||||
+ default = false,
|
||||
)
|
||||
|
||||
val shouldUseComposableToolbar = true
|
||||
--
|
||||
2.53.0
|
||||
|
||||
|
||||
@@ -0,0 +1,657 @@
|
||||
package org.ironfoxoss.ironfox.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import androidx.core.content.edit
|
||||
import mozilla.components.support.base.log.logger.Logger
|
||||
import org.mozilla.fenix.ext.getPreferenceKey
|
||||
import org.mozilla.fenix.ext.settings
|
||||
|
||||
/**
|
||||
* IronFox Fenix Preference Utilities
|
||||
*
|
||||
* @param context Application context
|
||||
*/
|
||||
class IFPrefUtils(private val context: Context) {
|
||||
private val logger = Logger("IFPrefUtils")
|
||||
|
||||
internal val sharedPrefs: SharedPreferences = context.settings().preferences
|
||||
|
||||
/**
|
||||
* Clear a preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun clearPref(resID: Int) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { remove(pref) }
|
||||
}
|
||||
logger.debug("clearPref: Cleared pref: '${pref}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear a preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun clearStrPref(pref: String) {
|
||||
if (sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { remove(pref) }
|
||||
}
|
||||
logger.debug("clearStrPref: Cleared pref: '${pref}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a preference from a resource ID exists
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun prefExists(resID: Int): Boolean {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (sharedPrefs.contains(pref)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a preference from a string exists
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun strPrefExists(pref: String): Boolean {
|
||||
if (sharedPrefs.contains(pref)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a boolean preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun getBoolPref(resID: Int): Boolean {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getBoolPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getBoolean(pref, false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a boolean preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun getStrBoolPref(pref: String): Boolean {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getStrBoolPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getBoolean(pref, false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of an integer preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun getIntPref(resID: Int): Int {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getIntPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getInt(pref, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of an integer preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun getStrIntPref(pref: String): Int {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getStrIntPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getInt(pref, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a string preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun getStringPref(resID: Int): String {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
val sharedPrefValue = sharedPrefs.getString(pref, null)
|
||||
|
||||
if (sharedPrefValue == null) {
|
||||
logger.warn("getStringPref: Pref does not exist: '${pref}'")
|
||||
return "does-not-exist"
|
||||
} else {
|
||||
return sharedPrefValue
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a string preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun getStrStringPref(pref: String): String {
|
||||
val sharedPrefValue = sharedPrefs.getString(pref, null)
|
||||
|
||||
if (sharedPrefValue == null) {
|
||||
logger.warn("getStrStringPref: Pref does not exist: '${pref}'")
|
||||
return "does-not-exist"
|
||||
} else {
|
||||
return sharedPrefValue
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a StringSet preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun getStringSetPref(resID: Int): Set<String> {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
val sharedPrefValue = sharedPrefs.getStringSet(pref, null)
|
||||
|
||||
if (sharedPrefValue == null) {
|
||||
logger.warn("getStringSetPref: Pref does not exist: '${pref}'")
|
||||
return emptySet()
|
||||
} else {
|
||||
return sharedPrefValue
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a StringSet preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun getStrStringSetPref(pref: String): Set<String> {
|
||||
val sharedPrefValue = sharedPrefs.getStringSet(pref, null)
|
||||
|
||||
if (sharedPrefValue == null) {
|
||||
logger.warn("getStrStringSetPref: Pref does not exist: '${pref}'")
|
||||
return emptySet()
|
||||
} else {
|
||||
return sharedPrefValue
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a float preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun getFloatPref(resID: Int): Float {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getFloatPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getFloat(pref, 0f)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a float preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun getStrFloatPref(pref: String): Float {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getStrFloatPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getFloat(pref, 0f)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a long preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
*/
|
||||
fun getLongPref(resID: Int): Long {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getLongPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getLong(pref, 0L)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current value of a long preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
*/
|
||||
fun getStrLongPref(pref: String): Long {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
logger.warn("getStrLongPref: Pref does not exist: '${pref}'")
|
||||
}
|
||||
return sharedPrefs.getLong(pref, 0L)
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a boolean preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setBoolPref(resID: Int, value: Boolean) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getBoolean(pref, !value) == value)) {
|
||||
return
|
||||
}
|
||||
sharedPrefs.edit { putBoolean(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setBoolPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a boolean preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrBoolPref(pref: String, value: Boolean) {
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getBoolean(pref, !value) == value)) {
|
||||
return
|
||||
}
|
||||
sharedPrefs.edit { putBoolean(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrBoolPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a boolean preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setDefaultBoolPref(resID: Int, value: Boolean) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putBoolean(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setDefaultBoolPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a boolean preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrDefaultBoolPref(pref: String, value: Boolean) {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putBoolean(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrDefaultBoolPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of an integer preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setIntPref(resID: Int, value: Int) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
// Determine the test value we should use
|
||||
val testValue = if (value == 0) {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getInt(pref, testValue) == value)) {
|
||||
return
|
||||
}
|
||||
|
||||
sharedPrefs.edit { putInt(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setIntPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of an integer preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrIntPref(pref: String, value: Int) {
|
||||
// Determine the test value we should use
|
||||
val testValue = if (value == 0) {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getInt(pref, testValue) == value)) {
|
||||
return
|
||||
}
|
||||
|
||||
sharedPrefs.edit { putInt(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrIntPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of an integer preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setDefaultIntPref(resID: Int, value: Int) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putInt(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setDefaultIntPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of an integer preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrDefaultIntPref(pref: String, value: Int) {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putInt(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrDefaultIntPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a string preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStringPref(resID: Int, value: String) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getString(pref, null) == value)) {
|
||||
return
|
||||
}
|
||||
sharedPrefs.edit { putString(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStringPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a string preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrStringPref(pref: String, value: String) {
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getString(pref, null) == value)) {
|
||||
return
|
||||
}
|
||||
sharedPrefs.edit { putString(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrStringPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a string preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setDefaultStringPref(resID: Int, value: String) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putString(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setDefaultStringPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a string preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrDefaultStringPref(pref: String, value: String) {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putString(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrDefaultStringPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a StringSet preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStringSetPref(resID: Int, value: Set<String>) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getStringSet(pref, null) == value)) {
|
||||
return
|
||||
}
|
||||
sharedPrefs.edit { putStringSet(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStringSetPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a StringSet preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrStringSetPref(pref: String, value: Set<String>) {
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getStringSet(pref, null) == value)) {
|
||||
return
|
||||
}
|
||||
sharedPrefs.edit { putStringSet(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrStringSetPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a StringSet preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setDefaultStringSetPref(resID: Int, value: Set<String>) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putStringSet(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setDefaultStringSetPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a StringSet preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrDefaultStringSetPref(pref: String, value: Set<String>) {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putStringSet(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrDefaultStringSetPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a float preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setFloatPref(resID: Int, value: Float) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
// Determine the test value we should use
|
||||
val testValue = if (value == 0f) {
|
||||
1f
|
||||
} else {
|
||||
0f
|
||||
}
|
||||
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getFloat(pref, testValue) == value)) {
|
||||
return
|
||||
}
|
||||
|
||||
sharedPrefs.edit { putFloat(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setFloatPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a float preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrFloatPref(pref: String, value: Float) {
|
||||
// Determine the test value we should use
|
||||
val testValue = if (value == 0f) {
|
||||
1f
|
||||
} else {
|
||||
0f
|
||||
}
|
||||
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getFloat(pref, testValue) == value)) {
|
||||
return
|
||||
}
|
||||
|
||||
sharedPrefs.edit { putFloat(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrFloatPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a float preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setDefaultFloatPref(resID: Int, value: Float) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putFloat(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setDefaultFloatPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a float preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrDefaultFloatPref(pref: String, value: Float) {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putFloat(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrDefaultFloatPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a long preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setLongPref(resID: Int, value: Long) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
// Determine the test value we should use
|
||||
val testValue = if (value == 0L) {
|
||||
1L
|
||||
} else {
|
||||
0L
|
||||
}
|
||||
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getLong(pref, testValue) == value)) {
|
||||
return
|
||||
}
|
||||
|
||||
sharedPrefs.edit { putLong(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setLongPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a long preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrLongPref(pref: String, value: Long) {
|
||||
// Determine the test value we should use
|
||||
val testValue = if (value == 0L) {
|
||||
1L
|
||||
} else {
|
||||
0L
|
||||
}
|
||||
|
||||
// If the pref values already match, we don't have to do anything
|
||||
if (sharedPrefs.contains(pref) && (sharedPrefs.getLong(pref, testValue) == value)) {
|
||||
return
|
||||
}
|
||||
|
||||
sharedPrefs.edit { putLong(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrLongPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a long preference from a resource ID
|
||||
*
|
||||
* @param resID Resource ID
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setDefaultLongPref(resID: Int, value: Long) {
|
||||
val pref = context.getPreferenceKey(resID)
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putLong(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setDefaultLongPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default value of a long preference from a string
|
||||
*
|
||||
* @param pref Preference key
|
||||
* @param value Preference value
|
||||
*/
|
||||
fun setStrDefaultLongPref(pref: String, value: Long) {
|
||||
if (!sharedPrefs.contains(pref)) {
|
||||
sharedPrefs.edit { putLong(pref, value) }
|
||||
sharedPrefs.edit { commit() }
|
||||
logger.debug("setStrDefaultLongPref: Set pref: '${pref}' to value: '${value}'")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
package org.ironfoxoss.ironfox.utils
|
||||
|
||||
import android.content.Context
|
||||
import mozilla.components.lib.crash.store.CrashReportOption
|
||||
import org.ironfoxoss.ironfox.utils.IFPrefUtils
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.settings.sitepermissions.AUTOPLAY_BLOCK_ALL
|
||||
import org.mozilla.fenix.termsofuse.TOU_TIME_IN_MILLIS
|
||||
|
||||
/**
|
||||
* IronFox Fenix Preferences
|
||||
*
|
||||
*/
|
||||
object IFPrefs {
|
||||
/**
|
||||
* Set our Fenix preferences
|
||||
*
|
||||
* @param context Application context
|
||||
*/
|
||||
fun setPrefs(
|
||||
context: Context
|
||||
) {
|
||||
val prefs = IFPrefUtils(context)
|
||||
|
||||
// Allow zoom on all websites, even if the website tries to block it
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_accessibility_force_enable_zoom, true)
|
||||
|
||||
// Block media autoplay by default
|
||||
prefs.setStrDefaultIntPref("AUTOPLAY_USER_SETTING", AUTOPLAY_BLOCK_ALL)
|
||||
prefs.setDefaultIntPref(R.string.pref_key_browser_feature_autoplay_audible_v2, 0) // 0: Block, 1: Ask to Allow, 2: Allow
|
||||
prefs.setDefaultIntPref(R.string.pref_key_browser_feature_autoplay_inaudible_v2, 0) // 0: Block, 1: Ask to Allow, 2: Allow
|
||||
|
||||
// Block websites from prompting to access geolocation by default
|
||||
prefs.setDefaultIntPref(R.string.pref_key_phone_feature_location, 0) // 0: Block, 1: Ask to Allow, 2: Allow
|
||||
|
||||
// Block websites from prompting to display notifications by default
|
||||
prefs.setDefaultIntPref(R.string.pref_key_phone_feature_notification, 0) // 0: Block, 1: Ask to Allow, 2: Allow
|
||||
|
||||
// Check the boxes for manually clearing browsing data by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_browsing_history_now, true) // [DEFAULT] Browsing history
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_cookies_now, true) // [DEFAULT] Cookies
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_caches_now, true) // [DEFAULT] Cache
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_downloads_now, true) // [DEFAULT] Download history
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_open_tabs_now, true) // [DEFAULT] Open tabs
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_permissions_now, true) // [DEFAULT] Permissions
|
||||
|
||||
// Clear browsing history, cache, download history, and open tabs on exit by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_browsing_data_on_quit, true)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_browsing_history_on_quit, true) // Browsing history
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_caches_on_quit, true) // Cache
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_downloads_on_quit, true) // Download history
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_open_tabs_on_quit, true) // Open tabs
|
||||
|
||||
/// Ensure we don't clear cookies and permissions by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_cookies_and_site_data_on_quit, false)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_delete_permissions_on_quit, false)
|
||||
|
||||
// Configure the default homepage
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_customization_bookmarks, false) // Recently Saved Bookmarks
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_recent_tabs, false) // Recently Tabs
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_history_metadata_feature, false) // Recently Visited
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_privacy_report, false) // Privacy Report
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_show_top_sites, true) // [DEFAULT] Shortcuts
|
||||
|
||||
// Disable AI Controls
|
||||
prefs.setBoolPref(R.string.pref_key_enable_ai_controls, false)
|
||||
|
||||
// Disable AI Shake to Summarize
|
||||
prefs.setBoolPref(R.string.pref_key_enable_shake_to_summarize, false)
|
||||
|
||||
// Disable autofill by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_autofill_logins, false)
|
||||
|
||||
// Disable Contile
|
||||
prefs.setBoolPref(R.string.pref_key_enable_contile, false)
|
||||
prefs.setBoolPref(R.string.pref_key_suppress_sponsored_tiles, true)
|
||||
|
||||
// Disable crash reporting
|
||||
prefs.setBoolPref(R.string.pref_key_crash_reporter, false)
|
||||
prefs.setStringPref(R.string.pref_key_crash_reporting_choice, CrashReportOption.Never.toString())
|
||||
prefs.setBoolPref(R.string.pref_key_crash_pull_never_show_again, true)
|
||||
|
||||
// Disable exceptions required to avoid minor breakage by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_tracking_protection_custom_allow_list_convenience, false) // [DEFAULT]
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_tracking_protection_strict_allow_list_convenience, false) // [DEFAULT]
|
||||
|
||||
// Disable Firefox Relay by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_email_mask_suggestion, false)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_email_masks, false)
|
||||
|
||||
// Disable Firefox Suggest
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_fxsuggest, false)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_show_nonsponsored_suggestions, false)
|
||||
prefs.setBoolPref(R.string.pref_key_show_sponsored_suggestions, false)
|
||||
|
||||
// Disable Firefox Sync by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_addresses_sync_cards_across_devices, false)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_credit_cards_sync_cards_across_devices, false)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_address_sync, false)
|
||||
|
||||
// Disable Google Lens integration
|
||||
prefs.setBoolPref(R.string.pref_key_google_lens_integration, false)
|
||||
|
||||
// Disable historical search suggestions by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_search_browsing_history, false)
|
||||
|
||||
// Disable import of Mozilla's default shortcuts
|
||||
prefs.setBoolPref(R.string.default_top_sites_added, true)
|
||||
|
||||
// Disable MARS (Mozilla Ad Routing Service)
|
||||
prefs.setBoolPref(R.string.pref_key_enable_mozilla_ads_client, false)
|
||||
|
||||
// Disable Mozilla feedback surveys
|
||||
prefs.setBoolPref(R.string.pref_key_microsurvey_feature_enabled, false)
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_microsurvey_prompt, false)
|
||||
|
||||
// Disable Mozilla in-app messages and pop-ups
|
||||
prefs.setBoolPref(R.string.pref_cfr_popups_enabled, false)
|
||||
prefs.setBoolPref(R.string.pref_in_app_messages_enabled, false)
|
||||
|
||||
// Disable Mozilla nags, CFRs, and promotions
|
||||
prefs.setBoolPref(R.string.pref_key_first_time_engage_with_signup, false)
|
||||
prefs.setBoolPref(R.string.pref_key_has_inactive_tabs_auto_close_dialog_dismissed, true)
|
||||
prefs.setBoolPref(R.string.pref_key_menu_cfr, false)
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_auto_close_tabs_banner, false)
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_cookie_banners_action_popup, false)
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_email_mask_cfr, false)
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_inactive_tabs_popup, false)
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_lock_pbm_banner, false)
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_open_in_app_banner, false)
|
||||
prefs.setBoolPref(R.string.pref_key_show_first_time_translation, false)
|
||||
prefs.setBoolPref(R.string.pref_key_show_menu_banner, false)
|
||||
prefs.setBoolPref(R.string.pref_key_summarize_toolbar_cfr_shown, true)
|
||||
prefs.setBoolPref(R.string.pref_key_toolbar_has_shown_tab_swipe_cfr, true)
|
||||
prefs.setBoolPref(R.string.pref_key_user_knows_about_pwa, true)
|
||||
prefs.setBoolPref(R.string.pref_key_wallpapers_onboarding, false)
|
||||
|
||||
// Disable Nimbus
|
||||
prefs.setBoolPref(R.string.pref_key_experimentation_v2, false)
|
||||
prefs.setBoolPref(R.string.pref_key_is_first_run, true) // [DEFAULT] Ensure Nimbus only applies experiments locally
|
||||
prefs.setBoolPref(R.string.pref_key_is_first_splash_screen_shown, true)
|
||||
prefs.setBoolPref(R.string.pref_key_nimbus_experiments_fetched, true)
|
||||
prefs.setBoolPref(R.string.pref_key_nimbus_use_preview, false)
|
||||
prefs.setBoolPref(R.string.pref_key_user_disabled_experimentation, true)
|
||||
|
||||
// Disable Nimbus Rollouts
|
||||
prefs.setBoolPref(R.string.pref_key_rollouts, false)
|
||||
|
||||
// Disable Password Manager by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_addresses_save_and_autofill_addresses, false)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_credit_cards_save_and_autofill_cards, false)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_never_save_logins, true)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_save_logins, false)
|
||||
|
||||
// Disable Pocket
|
||||
prefs.setBoolPref(R.string.pref_key_pocket_homescreen_recommendations, false)
|
||||
prefs.setBoolPref(R.string.pref_key_pocket_sponsored_stories, false)
|
||||
|
||||
// Disable recent search suggestions by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_show_recent_search_suggestions, false)
|
||||
|
||||
// Disable remote debugging
|
||||
/// We effectively no-op this anyways (in favor of using the Gecko pref directly)
|
||||
prefs.setBoolPref(R.string.pref_key_remote_debugging, false) // [DEFAULT]
|
||||
|
||||
// Disable remote search configuration
|
||||
prefs.setBoolPref(R.string.pref_key_use_remote_search_configuration, false)
|
||||
|
||||
// Disable search suggestions by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_show_search_suggestions, false)
|
||||
prefs.setBoolPref(R.string.pref_key_show_search_suggestions_in_private_onboarding, true)
|
||||
|
||||
// Disable 'Search Optimization' cards
|
||||
prefs.setBoolPref(R.string.pref_key_search_optimization_cards, false)
|
||||
prefs.setBoolPref(R.string.pref_key_search_optimization_feature, false)
|
||||
prefs.setBoolPref(R.string.pref_key_search_optimization_flights, false)
|
||||
prefs.setBoolPref(R.string.pref_key_search_optimization_sports, false)
|
||||
prefs.setBoolPref(R.string.pref_key_search_optimization_stocks, false)
|
||||
|
||||
// Disable the 'Sent from Firefox' footer/link sharing feature
|
||||
prefs.setBoolPref(R.string.pref_key_link_sharing, false)
|
||||
prefs.setBoolPref(R.string.pref_key_link_sharing_settings_snackbar, true)
|
||||
|
||||
// Disable the set-up checklist
|
||||
prefs.setBoolPref(R.string.pref_key_setup_checklist_complete, false)
|
||||
prefs.setBoolPref(R.string.pref_key_setup_step_extensions, true)
|
||||
prefs.setBoolPref(R.string.pref_key_setup_step_install_search_widget, true)
|
||||
prefs.setBoolPref(R.string.pref_key_setup_step_theme, true)
|
||||
prefs.setBoolPref(R.string.pref_key_setup_step_toolbar, true)
|
||||
|
||||
// Disable stories
|
||||
prefs.setBoolPref(R.string.pref_key_private_mode_and_stories_entry_point, false)
|
||||
|
||||
// Disable telemetry
|
||||
prefs.setStringPref(R.string.pref_key_custom_glean_server_url, "data;")
|
||||
prefs.setBoolPref(R.string.pref_key_daily_usage_ping, false)
|
||||
prefs.setStringPref(R.string.pref_key_glean_usage_profile_id, "beefbeef-beef-beef-beef-beeefbeefbee")
|
||||
prefs.setBoolPref(R.string.pref_key_marketing_telemetry, false) // [DEFAULT]
|
||||
prefs.setBoolPref(R.string.pref_key_should_show_marketing_onboarding, false)
|
||||
prefs.setBoolPref(R.string.pref_key_telemetry, false)
|
||||
|
||||
/// For redundancy/defense in depth, ensure we never try to submit various pings
|
||||
prefs.setBoolPref(R.string.pref_key_first_week_post_install_everyday_activity_and_set_to_default_sent, true)
|
||||
prefs.setBoolPref(R.string.pref_key_first_week_post_install_is_browser_set_to_default_during_first_four_days, true)
|
||||
prefs.setBoolPref(R.string.pref_key_first_week_post_install_last_three_days_activity_sent, true)
|
||||
prefs.setBoolPref(R.string.pref_key_first_week_post_install_recurrent_activity_sent, true)
|
||||
prefs.setBoolPref(R.string.pref_key_growth_ad_click_sent, true)
|
||||
prefs.setBoolPref(R.string.pref_key_growth_first_week_series_sent, true)
|
||||
prefs.setBoolPref(R.string.pref_key_growth_set_as_default, true)
|
||||
prefs.setBoolPref(R.string.pref_key_growth_usage_time_sent, true)
|
||||
|
||||
/// Ensure we don't enable third-party data sharing
|
||||
// We remove the Adjust Metrics Service entirely, so this is mainly for defense in depth/redundancy
|
||||
// https://searchfox.org/firefox-main/rev/d5171e9e/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt#233
|
||||
prefs.setBoolPref(R.string.pref_key_is_user_meta_attributed, false)
|
||||
prefs.setBoolPref(R.string.pref_key_is_user_reddit_attributed, false)
|
||||
prefs.setBoolPref(R.string.pref_key_is_user_tiktok_attributed, false)
|
||||
prefs.setBoolPref(R.string.pref_key_is_user_x_twitter_attributed, false)
|
||||
|
||||
// Disable third-party/OS-level root certificates by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_allow_third_party_root_certs, false) // [DEFAULT]
|
||||
|
||||
// Disable trending search suggestions by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_show_trending_search_suggestions, false)
|
||||
|
||||
// Disable the new 'Unified Trust Panel' by default
|
||||
// This prevents setting per-site exceptions for the built-in cookie banner blocker
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_unified_trust_panel, false)
|
||||
|
||||
// Disable URL autocomplete by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_autocomplete_urls, false)
|
||||
|
||||
// Disable the World Cup widget/promotion
|
||||
prefs.setBoolPref(R.string.pref_key_enable_homepage_sports_widget, false)
|
||||
prefs.setBoolPref(R.string.pref_key_show_homepage_sports_widget, false)
|
||||
|
||||
// Disable Zygote preloading by default
|
||||
// https://grapheneos.org/usage#exec-spawning
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_app_zygote_process, false)
|
||||
|
||||
// Display extensions in the custom tabs menu by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_should_show_custom_tab_extensions, true)
|
||||
|
||||
// Display the toolbar on the top by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_toolbar_bottom, false)
|
||||
|
||||
// Enable app icon selection
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_app_icon_selection_enabled, true)
|
||||
|
||||
// Enable Cookie Banner Reduction (in Private Browsing) by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_cookie_banner_private_mode, true)
|
||||
|
||||
// Enable DoH UI settings
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_doh_settings_enabled, true)
|
||||
|
||||
// Enable DoH without fallback by default
|
||||
prefs.setDefaultIntPref(R.string.pref_key_doh_settings_mode, 3)
|
||||
|
||||
/// Set the default DoH provider to Mullvad (Base)
|
||||
prefs.setStringPref(R.string.pref_key_doh_default_provider_uri, "https://base.dns.mullvad.net/dns-query")
|
||||
|
||||
// Enable exceptions required to avoid major breakage by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_tracking_protection_custom_allow_list_baseline, true) // [DEFAULT]
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_tracking_protection_strict_allow_list_baseline, true) // [DEFAULT]
|
||||
|
||||
// Enable Firefox Labs
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_firefox_labs, true)
|
||||
|
||||
// Enable Global Privacy Control by default
|
||||
/// We effectively no-op this anyways (in favor of using the Gecko pref directly)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_privacy_enable_global_privacy_control, true)
|
||||
|
||||
// Enable ETP Strict
|
||||
prefs.setBoolPref(R.string.pref_key_tracking_protection, true) // [DEFAULT]
|
||||
prefs.setBoolPref(R.string.pref_key_tracking_protection_custom_option, false)
|
||||
prefs.setBoolPref(R.string.pref_key_tracking_protection_standard_option, false)
|
||||
prefs.setBoolPref(R.string.pref_key_tracking_protection_strict_default, true)
|
||||
|
||||
// Enable HTTPS-Only Mode by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_https_only, true)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_https_only_in_all_tabs, true) // [DEFAULT]
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_https_only_in_private_tabs, false) // [DEFAULT]
|
||||
|
||||
// Enable Local Network Access Restrictions
|
||||
prefs.setDefaultIntPref(R.string.pref_key_browser_feature_local_device_access, 0) // 0: Block, 1: Ask to Allow, 2: Allow
|
||||
prefs.setDefaultIntPref(R.string.pref_key_browser_feature_local_network_access, 0) // 0: Block, 1: Ask to Allow, 2: Allow
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_lna_blocking_enabled, true)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_lna_feature_enabled, true)
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_enable_lna_tracker_blocking_enabled, true)
|
||||
|
||||
// Enable Private Browsing Lock
|
||||
// Allows users to require authentication to access tabs in Private Browsing
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_private_browsing_locked_enabled, true)
|
||||
|
||||
// Enable Pull-to-refresh by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_website_pull_to_refresh, true) // [DEFAULT]
|
||||
|
||||
// Enable Settings Search by default
|
||||
prefs.setDefaultBoolPref(R.string.pref_key_allow_settings_search, true)
|
||||
|
||||
// Skip Mozilla's Privacy Notice and Terms of Use
|
||||
val tosTime = TOU_TIME_IN_MILLIS + 1_000
|
||||
prefs.setLongPref(R.string.pref_key_privacy_notice_banner_last_displayed_time, tosTime)
|
||||
prefs.setBoolPref(R.string.pref_key_terms_accepted, true)
|
||||
prefs.setLongPref(R.string.pref_key_terms_accepted_date, tosTime)
|
||||
prefs.setBoolPref(R.string.pref_key_terms_prompt_drag_handle_enabled, true)
|
||||
prefs.setBoolPref(R.string.pref_key_terms_prompt_enabled, false)
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Tue, 17 Feb 2026 04:27:36 +0000
|
||||
Subject: [PATCH] fix: Disable and remove Mozilla Terms of Use/Privacy Policy
|
||||
nags and entrypoints
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
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 e1eedc43d242..2316d347a121 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
|
||||
@@ -74,6 +74,7 @@ import org.mozilla.fenix.termsofuse.TOU_VERSION
|
||||
import org.mozilla.fenix.wallpapers.Wallpaper
|
||||
import java.security.InvalidParameterException
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
+import org.mozilla.fenix.termsofuse.TOU_TIME_IN_MILLIS
|
||||
|
||||
private const val AUTOPLAY_USER_SETTING = "AUTOPLAY_USER_SETTING"
|
||||
private const val MAX_ANIMATION_FOREGROUND = 5
|
||||
@@ -625,24 +626,25 @@ class Settings(
|
||||
|
||||
var hasAcceptedTermsOfService by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_terms_accepted),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
persistDefaultIfNotExists = true,
|
||||
)
|
||||
|
||||
+ val tosTime = TOU_TIME_IN_MILLIS + 1_000
|
||||
/**
|
||||
* The date the user accepted the Terms of Use.
|
||||
*/
|
||||
var termsOfUseAcceptedTimeInMillis by longPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_terms_accepted_date),
|
||||
default = {
|
||||
- if (hasAcceptedTermsOfService) {
|
||||
+ if (false) {
|
||||
getApplicationInstalledTime(
|
||||
packageManagerCompatHelper = packageManagerCompatHelper,
|
||||
packageName = packageName,
|
||||
logger = logger,
|
||||
)
|
||||
} else {
|
||||
- 0L
|
||||
+ tosTime
|
||||
}
|
||||
},
|
||||
)
|
||||
@@ -655,7 +657,7 @@ class Settings(
|
||||
|
||||
var privacyNoticeBannerLastDisplayedTimeInMillis by longPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_privacy_notice_banner_last_displayed_time),
|
||||
- default = 0,
|
||||
+ default = tosTime,
|
||||
)
|
||||
|
||||
/**
|
||||
--
|
||||
@@ -1,49 +1,16 @@
|
||||
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 83e0f40483b7..2450c79f10ea 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
|
||||
@@ -1391,7 +1391,7 @@ class Settings(
|
||||
|
||||
var shouldDeleteBrowsingDataOnQuit by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_delete_browsing_data_on_quit),
|
||||
- default = false,
|
||||
+ default = true,
|
||||
)
|
||||
|
||||
var deleteOpenTabs by booleanPreference(
|
||||
@@ -1541,8 +1541,17 @@ class Settings(
|
||||
* @param type The [DeleteBrowsingDataOnQuitType] to check.
|
||||
* @return `true` if the data type is set to be deleted on quit, `false` otherwise.
|
||||
*/
|
||||
- fun getDeleteDataOnQuit(type: DeleteBrowsingDataOnQuitType): Boolean =
|
||||
- preferences.getBoolean(type.getPreferenceKey(appContext), false)
|
||||
+ fun getDeleteDataOnQuit(type: DeleteBrowsingDataOnQuitType): Boolean {
|
||||
+ val defaultValue = when(type) {
|
||||
+ DeleteBrowsingDataOnQuitType.CACHE -> true
|
||||
+ DeleteBrowsingDataOnQuitType.DOWNLOADS -> true
|
||||
+ DeleteBrowsingDataOnQuitType.HISTORY -> true
|
||||
+ DeleteBrowsingDataOnQuitType.TABS -> true
|
||||
+ else -> false
|
||||
+ }
|
||||
+
|
||||
+ return preferences.getBoolean(type.getPreferenceKey(appContext), defaultValue)
|
||||
+ }
|
||||
|
||||
/**
|
||||
* Sets whether a specific type of browsing data should be deleted on quit.
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: celenity <celenity@celenity.dev>
|
||||
Date: Sat, 27 Jun 2026 20:11:41 +0000
|
||||
Subject: [PATCH] feat: Sanitize data on exit by default
|
||||
|
||||
Ensures the UI reflects our values to sanitize data on exit by default
|
||||
|
||||
Signed-off-by: celenity <celenity@celenity.dev>
|
||||
---
|
||||
diff --git a/mobile/android/fenix/app/src/main/res/xml/delete_browsing_data_quit_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/delete_browsing_data_quit_preferences.xml
|
||||
index a5cc8cabb689..f38c9f61c4f2 100644
|
||||
index e0967307ccbc..561f423c1cc8 100644
|
||||
--- a/mobile/android/fenix/app/src/main/res/xml/delete_browsing_data_quit_preferences.xml
|
||||
+++ b/mobile/android/fenix/app/src/main/res/xml/delete_browsing_data_quit_preferences.xml
|
||||
@@ -5,7 +5,7 @@
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<SwitchPreference
|
||||
- android:defaultValue="false"
|
||||
+ android:defaultValue="true"
|
||||
android:key="@string/pref_key_delete_browsing_data_on_quit"
|
||||
android:summary="@string/preference_summary_delete_browsing_data_on_quit_2"
|
||||
android:title="@string/preferences_delete_browsing_data_on_quit" />
|
||||
@@ -16,10 +16,12 @@
|
||||
app:iconSpaceReserved="false"
|
||||
android:layout="@layout/preference_category_empty">
|
||||
@@ -73,3 +40,4 @@ index a5cc8cabb689..f38c9f61c4f2 100644
|
||||
android:key="@string/pref_key_delete_downloads_on_quit"
|
||||
android:layout="@layout/checkbox_left_preference"
|
||||
android:title="@string/preferences_delete_browsing_data_downloads" />
|
||||
--
|
||||
|
||||
@@ -54,14 +54,6 @@ categories:
|
||||
and simplify or declutter interface elements to enhance user clarity and recognition.
|
||||
|
||||
patches:
|
||||
# Accessibility
|
||||
- file: "fenix-force-enable-zoom-by-default.patch"
|
||||
name: "Enable Universal Zoom"
|
||||
description: "Allows zoom on all websites, even if the website tries to block it, by default"
|
||||
reason: "To improve accessibility by overriding website zoom restrictions."
|
||||
effect: "Users can zoom on all websites, even those trying to block zooming."
|
||||
category: "Accessibility"
|
||||
|
||||
# Build System
|
||||
- file: "a-c-allow-build-date-override.patch"
|
||||
name: "Allow overriding the build date"
|
||||
@@ -320,13 +312,6 @@ patches:
|
||||
effect: "Ensures user configurations remain consistent and are controlled locally."
|
||||
category: "Mozilla"
|
||||
|
||||
- file: "fenix-disable-nimbus-rollouts.patch"
|
||||
name: "Disable Nimbus Rollouts (Fenix)"
|
||||
description: "Prevents A/B testing via Nimbus within Firefox for Android."
|
||||
reason: "To reduce data collection and remove Mozilla's ability to remotely change browser settings."
|
||||
effect: "Ensures user configurations remain consistent and are controlled locally."
|
||||
category: "Mozilla"
|
||||
|
||||
- file: "gecko-disable-nimbus.patch"
|
||||
name: "Disable Nimbus Experimentation (Gecko)"
|
||||
description: "Prevents A/B testing and remote configuration of settings via Nimbus within Gecko."
|
||||
@@ -341,20 +326,6 @@ patches:
|
||||
effect: "Cleaner, more private address bar experience, without web suggestions."
|
||||
category: "Mozilla"
|
||||
|
||||
- file: "fenix-disable-firefox-relay.patch"
|
||||
name: "Disable Firefox Relay"
|
||||
description: "Disables Firefox Relay functionality."
|
||||
reason: "To reduce reliance/integration with external Mozilla services, and provide users with more control over whether they wish to use this functionality."
|
||||
effect: "Cleaner browsing experience, with more control provided to users."
|
||||
category: "Mozilla"
|
||||
|
||||
- file: "fenix-remove-tos-privacy-policy.patch"
|
||||
name: "Remove ToS and Privacy Policy"
|
||||
description: "Removes unwanted elements related to Mozilla's terms of service and privacy policy."
|
||||
reason: "To prevent confusing users and to remove unwanted Mozilla branding."
|
||||
effect: "Users are provided with a cleaner browsing experience."
|
||||
category: "Mozilla"
|
||||
|
||||
- file: "fenix-disable-ai-controls.patch"
|
||||
name: "Disable AI Controls"
|
||||
description: "Disables the 'AI Controls' settings menu."
|
||||
@@ -418,9 +389,9 @@ patches:
|
||||
effect: "Users have improved privacy, security, and control over their extensions."
|
||||
category: "Mozilla"
|
||||
|
||||
- file: "fenix-disable-nags.patch"
|
||||
name: "Disable Nags"
|
||||
description: "Disables Contextual Feature Recommendations, prompts encouraging users to set the browser as the system default, and other promotional messaging."
|
||||
- file: "fenix-disable-cfrs.patch"
|
||||
name: "Disable Contextual Feature Recommendations (CFRs)"
|
||||
description: "Disables contextual feature recommendations and other promotional messaging."
|
||||
reason: "To remove promotional suggestions for Firefox features, and to eliminate unnecessary engagement messages that may interrupt user workflows."
|
||||
effect: "Provides a cleaner interface without contextual prompts, recommendations, and unwanted nags."
|
||||
category: "Mozilla"
|
||||
@@ -475,45 +446,6 @@ patches:
|
||||
effect: "Adds a selection of carefully selected DoH providers for the users to choose from."
|
||||
category: "Privacy"
|
||||
|
||||
- file: "fenix-enable-doh-via-mullvad-base-by-default.patch"
|
||||
name: "Enable DNS over HTTPS (via Mullvad (Base)) by default"
|
||||
description: "Enables DNS over HTTPS without fallback by default, and sets Mullvad (Base) as the default provider."
|
||||
reason: "To harden DoH out of the box."
|
||||
effect: "Improves DNS privacy and security by strengthening DoH's default protection level."
|
||||
category: "Privacy"
|
||||
|
||||
- file: "fenix-disable-autocomplete-by-default.patch"
|
||||
name: "Disable Autocomplete"
|
||||
description: "Disables URL autocomplete by default."
|
||||
reason: "To prevent accidental navigation to incorrect/undesired websites."
|
||||
effect: "Provides users with more control over the URL bar, and ensures that users only navigate to their intended location."
|
||||
category: "Privacy"
|
||||
|
||||
- file: "fenix-disable-password-mgr-and-autofill-by-default.patch"
|
||||
name: "Disable Password Manager and Address/Credit Card Autofill"
|
||||
description: |
|
||||
Disables password manager and address/credit card autofill by default. Using the built-in
|
||||
password manager in a browser is discouraged. Prefer using external, more secure
|
||||
password managers, such as Bitwarden.
|
||||
reason: "To prevent automatic storage of sensitive credentials in the browser."
|
||||
effect: |
|
||||
Reduces risk of credential exposure.
|
||||
category: "Privacy"
|
||||
|
||||
- file: "fenix-disable-trending-search-suggestions-by-default.patch"
|
||||
name: "Disable Trending Search Suggestions"
|
||||
description: "Disables trending search suggestions by default."
|
||||
reason: "Reduces unwanted network activity and connections to third party services."
|
||||
effect: "Cleaner, more private address bar experience, without trending search suggestions."
|
||||
category: "Privacy"
|
||||
|
||||
- file: "fenix-disable-search-suggestions-by-default.patch"
|
||||
name: "Disable Search Suggestions"
|
||||
description: "Disables search suggestions by default."
|
||||
reason: "To prevent automatic submission of text entered in the URL bar to search providers."
|
||||
effect: "Improves privacy by reducing data shared with search engines."
|
||||
category: "Privacy"
|
||||
|
||||
- file: "fenix-sanitize-data-on-exit-by-default.patch"
|
||||
name: "Sanitize Data on Exit"
|
||||
description: "Clears browsing data on exit by default"
|
||||
@@ -528,13 +460,6 @@ patches:
|
||||
effect: "Users can easily use privacy-respecting search engines."
|
||||
category: "Privacy"
|
||||
|
||||
- file: "fenix-enable-etp-strict.patch"
|
||||
name: "Enable ETP Strict"
|
||||
description: "Sets Enhanced Tracking Protection to Strict mode by default."
|
||||
reason: "To provide stronger protection against tracking without user configuration."
|
||||
effect: "Blocks more trackers and fingerprinting scripts out of the box, strengthens state partitioning, and enables protection against various other methods of cross-site tracking."
|
||||
category: "Privacy"
|
||||
|
||||
- file: "gecko-configure-ublock-origin.patch"
|
||||
name: "Configure uBlock Origin"
|
||||
description: "Sets uBlock Origin to use a custom/enhanced config, and changes certain settings by default."
|
||||
@@ -670,13 +595,6 @@ patches:
|
||||
effect: "Users are provided with a more secure PDF viewing experience, while still enjoying it from the comfort of their browser."
|
||||
category: "Security"
|
||||
|
||||
- file: "fenix-enable-https-only-mode-by-default.patch"
|
||||
name: "Enable HTTPS-Only Mode"
|
||||
description: "Enables HTTPS-only mode by default."
|
||||
reason: "To encrypt connections whenever possible."
|
||||
effect: "Improves privacy and security by preventing unencrypted HTTP connections."
|
||||
category: "Security"
|
||||
|
||||
- file: "gecko-prevent-extensions-from-changing-browser-settings.patch"
|
||||
name: "Prevent Extensions From Changing Browser Settings"
|
||||
description: "Prevents extensions from changing various browser settings."
|
||||
@@ -739,20 +657,6 @@ patches:
|
||||
category: "User Control"
|
||||
|
||||
# User Experience
|
||||
- file: "fenix-default-site-permissions.patch"
|
||||
name: "Default Site Permissions"
|
||||
description: "Configures IronFox's default site permissions. Currently blocks Autoplay, Geolocation prompts, and Notification prompts by default."
|
||||
reason: "To prevent websites from prompting users to access Geolocation and send Notifications, and to prevent unwanted audio/video playback."
|
||||
effect: "Improves user experience, and blocking Autoplay reduces bandwidth usage."
|
||||
category: "User Experience"
|
||||
|
||||
- file: "fenix-display-extensions-in-custom-tabs-menu-by-default.patch"
|
||||
name: "Display extensions in the custom tabs menu by default"
|
||||
description: "Displays the status of extensions in the menu for custom tabs."
|
||||
reason: "To improve freedom/control for users, by allowing them to see the status of extensions at any time, even when running with a custom tab."
|
||||
effect: "Users are provided with more control over their browsing experience."
|
||||
category: "User Interface"
|
||||
|
||||
- file: "gecko-ironfox-fingerprinting-protection-overrides.patch"
|
||||
name: "IronFox Fingerprinting Protection (FPP) Overrides"
|
||||
description: "Adds support for an internal list that disables specific fingerprinting protections as needed on a per-site basis."
|
||||
@@ -817,13 +721,6 @@ patches:
|
||||
effect: "Users are provided with more control by allowing them to control Cookie Banner Reduction on a per-site basis."
|
||||
category: "User Interface"
|
||||
|
||||
- file: "fenix-disable-history-and-recent-search-suggestions-by-default.patch"
|
||||
name: "Disable Historical and Recent Search Suggestions"
|
||||
description: "Disables recent and historical search suggestions by default."
|
||||
reason: "To provide users with a cleaner, focused URL bar and browsing experience."
|
||||
effect: "Cleaner interface so that users can focus on where they want to go now, instead of where they went in the past."
|
||||
category: "User Interface"
|
||||
|
||||
- file: "gecko-expose-hidden-aboutsupport-settings.patch"
|
||||
name: "Expose hidden settings at `about:support`"
|
||||
description: "Enables advanced options at `about:support`."
|
||||
|
||||
Reference in New Issue
Block a user