Minor tweaks/clean-up/refinements

I did some extensive testing and research, this should help to remove further reduce the complexity of our patches

Signed-off-by: celenity <celenity@celenity.dev>
This commit is contained in:
celenity
2025-07-10 21:41:23 -04:00
parent a078029412
commit 00a5d2e48b
24 changed files with 474 additions and 1570 deletions

View File

@@ -1,18 +1,8 @@
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 9197b274db..f82430aae7 100644
index 9197b274db..dd608587a0 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
@@ -745,20 +745,20 @@ class Settings(private val appContext: Context) : PreferencesHolder {
false,
)
- var shouldUseCookieBannerPrivateMode by lazyFeatureFlagPreference(
+ var shouldUseCookieBannerPrivateMode by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_cookie_banner_private_mode),
- featureFlag = true,
- default = { shouldUseCookieBannerPrivateModeDefaultValue },
+// featureFlag = true,
+ default = true,
@@ -752,13 +752,13 @@ class Settings(private val appContext: Context) : PreferencesHolder {
)
val shouldUseCookieBannerPrivateModeDefaultValue: Boolean
@@ -28,16 +18,3 @@ index 9197b274db..f82430aae7 100644
val shouldEnableCookieBannerDetectOnly: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_SETTING_DETECT_ONLY] == 1
diff --git a/mobile/android/fenix/app/src/main/res/xml/preferences.xml b/mobile/android/fenix/app/src/main/res/xml/preferences.xml
index 4c6b14bf87..2e4227a392 100644
--- a/mobile/android/fenix/app/src/main/res/xml/preferences.xml
+++ b/mobile/android/fenix/app/src/main/res/xml/preferences.xml
@@ -113,7 +113,7 @@
<org.mozilla.fenix.settings.cookiebannerhandling.CustomCBHSwitchPreference
android:key="@string/pref_key_cookie_banner_private_mode"
app:iconSpaceReserved="false"
- app:isPreferenceVisible="false"
+ app:isPreferenceVisible="true"
android:title="@string/preferences_cookie_banner_reduction_private_mode" />
<androidx.preference.Preference

View File

@@ -1,84 +1,47 @@
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/AboutFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/AboutFragment.kt
index e43dec84c6..4ddd7a6678 100644
index e43dec84c6..e462b4c0fe 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/AboutFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/about/AboutFragment.kt
@@ -208,28 +208,28 @@ class AboutFragment(
@@ -208,11 +208,11 @@ class AboutFragment(
AboutPageItem(
AboutItem.ExternalLink(
SUPPORT,
- SupportUtils.getSumoURLForTopic(context, SupportUtils.SumoTopic.HELP),
+ SupportUtils.IF_SUPPORT_URL,
+ "https://gitlab.com/ironfox-oss/IronFox/-/issues",
),
getString(R.string.about_support),
),
- AboutPageItem(
- AboutItem.Crashes,
- getString(R.string.about_crashes),
+/* AboutPageItem(
AboutItem.Crashes,
getString(R.string.about_crashes),
),
@@ -229,7 +229,7 @@ class AboutFragment(
SupportUtils.getSumoURLForTopic(context, SupportUtils.SumoTopic.YOUR_RIGHTS),
),
getString(R.string.about_know_your_rights),
- ),
- AboutPageItem(
- AboutItem.ExternalLink(
- PRIVACY_NOTICE,
- SupportUtils.getMozillaPageUrl(SupportUtils.MozillaPage.PRIVATE_NOTICE),
- ),
- getString(R.string.about_privacy_notice),
- ),
- AboutPageItem(
- AboutItem.ExternalLink(
- RIGHTS,
- SupportUtils.getSumoURLForTopic(context, SupportUtils.SumoTopic.YOUR_RIGHTS),
- ),
- getString(R.string.about_know_your_rights),
- ),
+// AboutPageItem(
+// AboutItem.Crashes,
+// getString(R.string.about_crashes),
+// ),
+// AboutPageItem(
+// AboutItem.ExternalLink(
+// PRIVACY_NOTICE,
+// SupportUtils.getMozillaPageUrl(SupportUtils.MozillaPage.PRIVATE_NOTICE),
+// ),
+// getString(R.string.about_privacy_notice),
+// ),
+// AboutPageItem(
+// AboutItem.ExternalLink(
+// RIGHTS,
+// SupportUtils.getSumoURLForTopic(context, SupportUtils.SumoTopic.YOUR_RIGHTS),
+// ),
+// getString(R.string.about_know_your_rights),
+// ),
+ ),*/
AboutPageItem(
AboutItem.ExternalLink(LICENSING_INFO, ABOUT_LICENSE_URL),
getString(R.string.about_licensing_information),
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
index c13ecb6c86..a9e364d69a 100644
index c13ecb6c86..cbcdfcb59e 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
@@ -21,15 +21,16 @@ import java.net.URLEncoder
import java.util.Locale
object SupportUtils {
- const val RATE_APP_URL = "market://details?id=" + BuildConfig.APPLICATION_ID
- const val POCKET_TRENDING_URL = "https://getpocket.com/fenix-top-articles"
- const val WIKIPEDIA_URL = "https://www.wikipedia.org/"
- const val FENIX_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=${BuildConfig.APPLICATION_ID}"
- const val GOOGLE_URL = "https://www.google.com/"
@@ -26,9 +26,9 @@ object SupportUtils {
const val WIKIPEDIA_URL = "https://www.wikipedia.org/"
const val FENIX_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=${BuildConfig.APPLICATION_ID}"
const val GOOGLE_URL = "https://www.google.com/"
- const val GOOGLE_US_URL = "https://www.google.com/webhp?client=firefox-b-1-m&channel=ts"
- const val GOOGLE_XX_URL = "https://www.google.com/webhp?client=firefox-b-m&channel=ts"
- const val WHATS_NEW_URL = "https://www.mozilla.org/firefox/android/notes"
+ const val RATE_APP_URL = ""
+ const val POCKET_TRENDING_URL = ""
+ const val WIKIPEDIA_URL = ""
+ const val FENIX_PLAY_STORE_URL = ""
+ const val GOOGLE_URL = ""
+ const val GOOGLE_US_URL = ""
+ const val GOOGLE_XX_URL = ""
+ const val WHATS_NEW_URL = "https://gitlab.com/ironfox-oss/IronFox/-/releases"
const val FXACCOUNT_SUMO_URL = "https://support.mozilla.org/kb/access-mozilla-services-firefox-account"
+ const val IF_SUPPORT_URL = "https://gitlab.com/ironfox-oss/IronFox/-/issues"
// This is locale-less on purpose so that the content negotiation happens on the AMO side because the current
// user language might not be supported by AMO and/or the language might not be exactly what AMO is expecting
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
index e5ab956ac3..8f88bf456e 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
@@ -93,7 +56,7 @@ index e5ab956ac3..8f88bf456e 100644
}
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/OnboardingMapper.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/OnboardingMapper.kt
index 795fcd7b7e..5c0cb8796e 100644
index 795fcd7b7e..1b4d2eef78 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/OnboardingMapper.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/OnboardingMapper.kt
@@ -32,7 +32,7 @@ internal fun Collection<OnboardingCardData>.toPageUiData(
@@ -105,16 +68,8 @@ index 795fcd7b7e..5c0cb8796e 100644
}
}
@@ -112,7 +112,6 @@ private fun OnboardingCardData.toPageUiData(privacyCaption: Caption?) = Onboardi
themeOptions = extraData?.customizationThemeData
?.takeIf { it.isNotEmpty() }
?.toOnboardingThemeOptions(),
- termsOfService = extraData?.termOfServiceData?.toOnboardingTermsOfService(),
marketingData = extraData?.marketingData?.toOnboardingMarketingData(),
)
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/TermsOfServiceOnboardingPage.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/TermsOfServiceOnboardingPage.kt
index 10488889d7..02572c03a1 100644
index 10488889d7..f916d94cc9 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/TermsOfServiceOnboardingPage.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/view/TermsOfServiceOnboardingPage.kt
@@ -135,22 +135,22 @@ private fun BodyText(
@@ -122,18 +77,16 @@ index 10488889d7..02572c03a1 100644
) {
val lineOneState = LinkTextState(
- text = it.lineOneLinkText,
- url = it.lineOneLinkUrl,
- onClick = eventHandler::onTermsOfServiceLinkClicked,
+ text = "",
+ url = "",
url = it.lineOneLinkUrl,
- onClick = eventHandler::onTermsOfServiceLinkClicked,
+ onClick = {},
)
val lineTwoState = LinkTextState(
- text = it.lineTwoLinkText,
- url = it.lineTwoLinkUrl,
- onClick = eventHandler::onPrivacyNoticeLinkClicked,
+ text = "",
+ url = "",
url = it.lineTwoLinkUrl,
- onClick = eventHandler::onPrivacyNoticeLinkClicked,
+ onClick = {},
)
val lineThreeState = LinkTextState(
@@ -167,29 +120,6 @@ index 10488889d7..02572c03a1 100644
linkTextStates = listOf(
lineThreeState,
),
@@ -201,14 +201,14 @@ private fun OnboardingPagePreview() {
title = stringResource(id = R.string.onboarding_welcome_to_firefox),
description = stringResource(id = R.string.onboarding_terms_of_service_sub_header_2),
termsOfService = OnboardingTermsOfService(
- lineOneText = stringResource(id = R.string.onboarding_term_of_service_line_one_2),
- lineOneLinkText = stringResource(id = R.string.onboarding_term_of_service_line_one_link_text_2),
- lineOneLinkUrl = "URL",
- lineTwoText = stringResource(id = R.string.onboarding_term_of_service_line_two_2),
- lineTwoLinkText = stringResource(id = R.string.onboarding_term_of_service_line_two_link_text),
- lineTwoLinkUrl = "URL",
- lineThreeText = stringResource(id = R.string.onboarding_term_of_service_line_three),
- lineThreeLinkText = stringResource(id = R.string.onboarding_term_of_service_line_three_link_text),
+ lineOneText = "",
+ lineOneLinkText = "",
+ lineOneLinkUrl = "",
+ lineTwoText = "",
+ lineTwoLinkText = "",
+ lineTwoLinkUrl = "",
+ lineThreeText = "",
+ lineThreeLinkText = "",
),
imageRes = R.drawable.ic_firefox,
primaryButton = Action(
diff --git a/mobile/android/moz.configure b/mobile/android/moz.configure
index 0e2a6efdc9..3d7ff4a88f 100644
--- a/mobile/android/moz.configure
@@ -210,36 +140,15 @@ index 0e2a6efdc9..3d7ff4a88f 100644
+
+include("ironfox.configure")
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 9197b274db..2d791fa7b7 100644
index 9197b274db..652a7a4486 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
@@ -395,10 +395,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = false,
@@ -438,7 +438,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var shouldShowPrivacyPopWindow by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_privacy_pop_window),
- default = true,
+ default = false,
)
- var hasAcceptedTermsOfService by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_terms_accepted),
- default = false,
- )
+ var hasAcceptedTermsOfService = true
+// appContext.getPreferenceKey(R.string.pref_key_terms_accepted),
+// default = false,
+// )
/**
* The daily usage ping is not normally tied to normal telemetry. We set the default value to
@@ -436,10 +436,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
val shouldShowSecurityPinWarning: Boolean
get() = secureWarningCount.underMaxCount()
- var shouldShowPrivacyPopWindow by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_privacy_pop_window),
- default = true,
- )
+ var shouldShowPrivacyPopWindow = false
+// appContext.getPreferenceKey(R.string.pref_key_privacy_pop_window),
+// default = true,
+// )
var shouldUseLightTheme by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_light_theme),

View File

@@ -197,39 +197,19 @@ index 028be832d6..50bf4971ff 100644
+ val cloudflareFamilyUri = "https://family.cloudflare-dns.com/dns-query"
}
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/doh/root/DohSettingsScreen.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/doh/root/DohSettingsScreen.kt
index f290b21561..506412b351 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/doh/root/DohSettingsScreen.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/doh/root/DohSettingsScreen.kt
@@ -556,8 +556,8 @@ private fun ExceptionsRow(onExceptionsClicked: () -> Unit) {
private fun DohScreenDefaultProviderPreview() {
FirefoxTheme {
val provider = Provider.BuiltIn(
- url = "https://mozilla.cloudflare-dns.com/dns-query",
- name = "Cloudflare",
+ url = "https://dns.quad9.net/dns-query",
+ name = "Quad9",
default = true,
)
DohSettingsScreen(
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 9197b274db..68bba5f520 100644
index 9197b274db..f89b2f7ea6 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
@@ -2362,10 +2362,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates whether or not to show the entry point for the DNS over HTTPS settings
@@ -2364,7 +2364,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- val showDohEntryPoint by lazyFeatureFlagPreference(
+ val showDohEntryPoint by booleanPreference(
val showDohEntryPoint by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_doh_settings_enabled),
- default = { FxNimbus.features.doh.value().showUi },
- featureFlag = true,
+ default = true,
+// featureFlag = true,
+ default = { true },
featureFlag = true,
)
/**
@@ -2377,7 +2377,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
private var trrMode by intPreference(
@@ -248,16 +228,3 @@ index 9197b274db..68bba5f520 100644
)
/**
diff --git a/mobile/android/fenix/app/src/main/res/xml/preferences.xml b/mobile/android/fenix/app/src/main/res/xml/preferences.xml
index 4c6b14bf87..98eacf1f23 100644
--- a/mobile/android/fenix/app/src/main/res/xml/preferences.xml
+++ b/mobile/android/fenix/app/src/main/res/xml/preferences.xml
@@ -107,7 +107,7 @@
<androidx.preference.Preference
android:key="@string/pref_key_doh_settings"
app:iconSpaceReserved="false"
- app:isPreferenceVisible="false"
+ app:isPreferenceVisible="true"
android:title="@string/preference_doh_title" />
<org.mozilla.fenix.settings.cookiebannerhandling.CustomCBHSwitchPreference

View File

@@ -1,5 +1,5 @@
diff --git a/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/AddonManager.kt b/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/AddonManager.kt
index c21f63a00d..30eb3ad1bb 100644
index c21f63a00d..a8ea5237b6 100644
--- a/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/AddonManager.kt
+++ b/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/AddonManager.kt
@@ -83,7 +83,7 @@ class AddonManager(
@@ -11,48 +11,24 @@ index c21f63a00d..30eb3ad1bb 100644
suspend fun getAddons(
waitForPendingActions: Boolean = true,
allowCache: Boolean = true,
@@ -113,6 +113,7 @@ class AddonManager(
@@ -113,7 +113,7 @@ class AddonManager(
// Get all the featured add-ons not installed from provider.
// NB: We're keeping translations only for the default locale.
var featuredAddons = emptyList<Addon>()
+ /*
try {
- try {
+/* try {
val userLanguage = Locale.getDefault().language
val locales = listOf(userLanguage)
@@ -124,6 +125,7 @@ class AddonManager(
featuredAddons =
@@ -123,7 +123,7 @@ class AddonManager(
} catch (throwable: Throwable) {
// Do not throw when we fail to fetch the featured add-ons since there can be installed add-ons.
logger.warn("Failed to get the featured add-ons", throwable)
}
+ */
- }
+ }*/
// Build a list of installed extensions that are not built-in extensions.
val installedAddons = installedExtensions
@@ -134,7 +136,7 @@ class AddonManager(
Addon.newFromWebExtension(extension, installedState)
}
- return@withContext featuredAddons + installedAddons
+ return@withContext installedAddons
} catch (throwable: Throwable) {
throw AddonManagerException(throwable)
}
diff --git a/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/amo/AMOAddonsProvider.kt b/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/amo/AMOAddonsProvider.kt
index bd3ea6e569..1d29839792 100644
--- a/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/amo/AMOAddonsProvider.kt
+++ b/mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/amo/AMOAddonsProvider.kt
@@ -38,9 +38,9 @@ import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.TimeUnit
internal const val API_VERSION = "api/v4"
-internal const val DEFAULT_SERVER_URL = "https://services.addons.mozilla.org"
-internal const val DEFAULT_COLLECTION_USER = "mozilla"
-internal const val DEFAULT_COLLECTION_NAME = "7e8d6dc651b54ab385fb8791bf9dac"
+internal const val DEFAULT_SERVER_URL = ""
+internal const val DEFAULT_COLLECTION_USER = ""
+internal const val DEFAULT_COLLECTION_NAME = ""
internal const val COLLECTION_FILE_NAME_PREFIX = "mozilla_components_addon_collection"
internal const val COLLECTION_FILE_NAME = "${COLLECTION_FILE_NAME_PREFIX}_%s.json"
internal const val COLLECTION_FILE_NAME_WITH_LANGUAGE = "${COLLECTION_FILE_NAME_PREFIX}_%s_%s.json"
diff --git a/mobile/android/fenix/app/build.gradle b/mobile/android/fenix/app/build.gradle
index d9a6045423..bf9c9237c6 100644
--- a/mobile/android/fenix/app/build.gradle
@@ -71,16 +47,3 @@ index d9a6045423..bf9c9237c6 100644
def deepLinkSchemeValue = "fenix-dev"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
index 5ba4561291..cc93a7bf9c 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
@@ -14,7 +14,7 @@ object FeatureFlags {
* This feature does not only depend on this flag. It requires the AMO collection override to
* be enabled which is behind the Secret Settings.
* */
- val customExtensionCollectionFeature = Config.channel.isNightlyOrDebug || Config.channel.isBeta
+ val customExtensionCollectionFeature = false
/**
* Pull-to-refresh allows you to pull the web content down far enough to have the page to

View File

@@ -11,86 +11,43 @@ index e6c63d7834..6652461ef2 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/settings/SecretSettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
index 43bea16286..499ee28bce 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
@@ -148,7 +148,7 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_fxsuggest).apply {
- isVisible = FeatureFlags.FX_SUGGEST
+ isVisible = true
isChecked = context.settings().enableFxSuggest
onPreferenceChangeListener = object : Preference.OnPreferenceChangeListener {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
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 9197b274db..c704357d27 100644
index 9197b274db..e3b7082380 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
@@ -2103,17 +2103,17 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if Firefox Suggest is enabled.
@@ -2105,7 +2105,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var enableFxSuggest by lazyFeatureFlagPreference(
+ var enableFxSuggest by booleanPreference(
var enableFxSuggest by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_fxsuggest),
- default = { FxNimbus.features.fxSuggest.value().enabled },
- featureFlag = FeatureFlags.FX_SUGGEST,
+ default = false,
+// featureFlag = FeatureFlags.FX_SUGGEST,
+ default = { false },
featureFlag = FeatureFlags.FX_SUGGEST,
)
/**
@@ -2113,7 +2113,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* Indicates if boosting AMP/wiki suggestions is enabled.
*/
val boostAmpWikiSuggestions: Boolean
- get() = FxNimbus.features.fxSuggest.value().boostAmpWiki
+ get() = false
+ get() = true
/**
* Indicates first time engaging with signup
@@ -2127,21 +2127,21 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* Indicates if the user has chosen to show sponsored search suggestions in the awesomebar.
* The default value is computed lazily, and based on whether Firefox Suggest is enabled.
*/
- var showSponsoredSuggestions by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_show_sponsored_suggestions),
- default = { enableFxSuggest },
@@ -2130,7 +2130,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showSponsoredSuggestions by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_show_sponsored_suggestions),
default = { enableFxSuggest },
- featureFlag = FeatureFlags.FX_SUGGEST,
- )
+ var showSponsoredSuggestions = false
+// key = appContext.getPreferenceKey(R.string.pref_key_show_sponsored_suggestions),
+// default = { enableFxSuggest },
+// featureFlag = FeatureFlags.FX_SUGGEST,
+// )
/**
* Indicates if the user has chosen to show search suggestions for web content in the
* awesomebar. The default value is computed lazily, and based on whether Firefox Suggest
* is enabled.
*/
- var showNonSponsoredSuggestions by lazyFeatureFlagPreference(
+ var showNonSponsoredSuggestions by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_show_nonsponsored_suggestions),
- default = { enableFxSuggest },
- featureFlag = FeatureFlags.FX_SUGGEST,
+ default = false,
+// featureFlag = FeatureFlags.FX_SUGGEST,
+ featureFlag = 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 f7ca109331..1bcf31ac06 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
@@ -85,7 +85,8 @@
app:iconSpaceReserved="false"
android:key="@string/pref_key_show_sponsored_suggestions"
android:title="@string/preferences_show_sponsored_suggestions"
- android:summary="@string/preferences_show_sponsored_suggestions_summary" />
+ android:summary="@string/preferences_show_sponsored_suggestions_summary"
+ app:isPreferenceVisible="false" />
<Preference
app:iconSpaceReserved="false"
android:key="@string/pref_key_learn_about_fx_suggest"
@@ -2140,7 +2140,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var showNonSponsoredSuggestions by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_show_nonsponsored_suggestions),
- default = { enableFxSuggest },
+ default = { false },
featureFlag = FeatureFlags.FX_SUGGEST,
)

View File

@@ -12,36 +12,25 @@ index 325e5d2141..90833e35cd 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 9197b274db..af31c06f8b 100644
index 9197b274db..58ff7665d8 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
@@ -679,16 +679,16 @@ class Settings(private val appContext: Context) : PreferencesHolder {
}
}
@@ -681,13 +681,13 @@ class Settings(private val appContext: Context) : PreferencesHolder {
- var whatsappLinkSharingEnabled by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_link_sharing),
var whatsappLinkSharingEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_link_sharing),
- featureFlag = true,
- default = { FxNimbus.features.sentFromFirefox.value().enabled },
- )
-
- var linkSharingSettingsSnackbarShown by booleanPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_link_sharing_settings_snackbar),
+ featureFlag = false,
default = { FxNimbus.features.sentFromFirefox.value().enabled },
)
var linkSharingSettingsSnackbarShown by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_link_sharing_settings_snackbar),
- default = false,
- )
+ var whatsappLinkSharingEnabled = false
+// key = appContext.getPreferenceKey(R.string.pref_key_link_sharing),
+// featureFlag = true,
+// default = { FxNimbus.features.sentFromFirefox.value().enabled },
+// )
+
+ var linkSharingSettingsSnackbarShown = true
+// key = appContext.getPreferenceKey(R.string.pref_key_link_sharing_settings_snackbar),
+// default = false,
+// )
+ default = true,
)
/**
* Get the display string for the current open links in apps setting
diff --git a/mobile/android/fenix/app/src/main/res/xml/link_sharing_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/link_sharing_preferences.xml
index faafebc7f2..cf8650c1ee 100644
--- a/mobile/android/fenix/app/src/main/res/xml/link_sharing_preferences.xml

View File

@@ -32,23 +32,15 @@ index 43bea16286..0245a82e17 100644
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
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 9197b274db..5ccaabf138 100644
index 9197b274db..ca0b4cdf4b 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
@@ -1809,11 +1809,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the MARS API integration is used for sponsored content.
*/
- var marsAPIEnabled by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_mars_api_enabled),
- default = { FxNimbus.features.mars.value().enabled },
@@ -1812,7 +1812,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var marsAPIEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_mars_api_enabled),
default = { FxNimbus.features.mars.value().enabled },
- featureFlag = true,
- )
+ var marsAPIEnabled = false
+// key = appContext.getPreferenceKey(R.string.pref_key_mars_api_enabled),
+// default = { FxNimbus.features.mars.value().enabled },
+// featureFlag = true,
+// )
+ featureFlag = false,
)
/**
* Indicates if the Contile functionality should be visible.

View File

@@ -12,35 +12,15 @@ index 43bea16286..7b4a264b5a 100644
onPreferenceChangeListener = SharedPreferenceUpdater()
}
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 9197b274db..0c167a77fc 100644
index 9197b274db..479bd47958 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
@@ -2222,19 +2222,19 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the microsurvey feature is enabled.
*/
- var microsurveyFeatureEnabled by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_microsurvey_feature_enabled),
- default = { FxNimbus.features.microsurveys.value().enabled },
@@ -2225,7 +2225,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var microsurveyFeatureEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_microsurvey_feature_enabled),
default = { FxNimbus.features.microsurveys.value().enabled },
- featureFlag = true,
- )
+ var microsurveyFeatureEnabled = false
+// key = appContext.getPreferenceKey(R.string.pref_key_microsurvey_feature_enabled),
+// default = { FxNimbus.features.microsurveys.value().enabled },
+// featureFlag = true,
+// )
+ featureFlag = false,
)
/**
* Indicates if a microsurvey should be shown to the user.
*/
- var shouldShowMicrosurveyPrompt by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_should_show_microsurvey_prompt),
- default = false,
- )
+ var shouldShowMicrosurveyPrompt = false
+// appContext.getPreferenceKey(R.string.pref_key_should_show_microsurvey_prompt),
+// default = false,
+// )
/**
* Last time the Set as default Browser prompt has been displayed to the user.

View File

@@ -12,7 +12,7 @@ index e5ab956ac3..4d1ef3de39 100644
private fun isNotDefaultBrowser(context: Context) =
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
index 9197b274db..2b38b6598d 100644
index 9197b274db..d6adb1bfb8 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
@@ -198,7 +198,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@@ -24,21 +24,15 @@ index 9197b274db..2b38b6598d 100644
var forceEnableZoom by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_accessibility_force_enable_zoom),
@@ -616,10 +616,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the user has completed successfully first translation.
@@ -618,7 +618,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var showFirstTimeTranslation: Boolean by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_show_first_time_translation),
var showFirstTimeTranslation: Boolean by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_show_first_time_translation),
- default = true,
- )
+ var showFirstTimeTranslation: Boolean = false
+// appContext.getPreferenceKey(R.string.pref_key_show_first_time_translation),
+// default = true,
+// )
+ default = false,
)
/**
* Indicates if the user wants translations to automatically be offered as a popup of the dialog.
@@ -788,12 +788,12 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* This will lead to a performance regression since that function can be expensive to call.
*/
@@ -58,51 +52,31 @@ index 9197b274db..2b38b6598d 100644
}
/**
@@ -805,40 +805,40 @@ class Settings(private val appContext: Context) : PreferencesHolder {
return browsers.isDefaultBrowser
@@ -802,12 +802,12 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
fun isDefaultBrowserBlocking(): Boolean {
val browsers = BrowsersCache.all(appContext)
- return browsers.isDefaultBrowser
+ return false
}
- var reEngagementNotificationShown by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_shown),
var reEngagementNotificationShown by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_shown),
- default = false,
- )
+ var reEngagementNotificationShown = true
+// appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_shown),
+// default = false,
+// )
+ default = true,
)
/**
* Check if we should set the re-engagement notification.
*/
fun shouldSetReEngagementNotification(): Boolean {
- return numberOfAppLaunches <= 1 && !reEngagementNotificationShown
+ return false
}
/**
* Check if we should show the re-engagement notification.
*/
fun shouldShowReEngagementNotification(): Boolean {
- return !reEngagementNotificationShown && !isDefaultBrowserBlocking()
+ return false
}
/**
* Indicates if the re-engagement notification feature is enabled
*/
- var reEngagementNotificationEnabled by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_enabled),
- default = { FxNimbus.features.reEngagementNotification.value().enabled },
@@ -830,7 +830,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var reEngagementNotificationEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_enabled),
default = { FxNimbus.features.reEngagementNotification.value().enabled },
- featureFlag = true,
- )
+ var reEngagementNotificationEnabled = false
+// key = appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_enabled),
+// default = { FxNimbus.features.reEngagementNotification.value().enabled },
+// featureFlag = true,
+// )
+ featureFlag = false,
)
/**
* Indicates if the re-engagement notification feature is enabled
@@ -838,7 +838,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
val reEngagementNotificationType: Int
get() =
@@ -111,207 +85,105 @@ index 9197b274db..2b38b6598d 100644
val shouldUseAutoBatteryTheme by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_auto_battery_theme),
@@ -898,30 +898,30 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the total cookie protection CRF should be shown.
@@ -900,7 +900,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var shouldShowEraseActionCFR by lazyFeatureFlagPreference(
- appContext.getPreferenceKey(R.string.pref_key_should_show_erase_action_popup),
var shouldShowEraseActionCFR by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_erase_action_popup),
- featureFlag = true,
- default = { feltPrivateBrowsingEnabled },
- )
+ var shouldShowEraseActionCFR = false
+// appContext.getPreferenceKey(R.string.pref_key_should_show_erase_action_popup),
+// featureFlag = true,
+// default = { feltPrivateBrowsingEnabled },
+// )
/**
* Indicates if the cookie banners CRF should be shown.
*/
- var shouldShowCookieBannersCFR by lazyFeatureFlagPreference(
- appContext.getPreferenceKey(R.string.pref_key_should_show_cookie_banners_action_popup),
- featureFlag = true,
- default = { shouldShowCookieBannerUI },
- )
+ var shouldShowCookieBannersCFR = false
+// appContext.getPreferenceKey(R.string.pref_key_should_show_cookie_banners_action_popup),
+// featureFlag = true,
+// default = { shouldShowCookieBannerUI },
+// )
- var shouldShowTabSwipeCFR by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_toolbar_tab_swipe_cfr),
- default = false,
- )
+ var shouldShowTabSwipeCFR = false
+// appContext.getPreferenceKey(R.string.pref_key_toolbar_tab_swipe_cfr),
+// default = false,
+// )
- var hasShownTabSwipeCFR by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_toolbar_has_shown_tab_swipe_cfr),
- default = false,
- )
+ var hasShownTabSwipeCFR = true
+// appContext.getPreferenceKey(R.string.pref_key_toolbar_has_shown_tab_swipe_cfr),
+// default = false,
+// )
val blockCookiesSelectionInCustomTrackingProtection by stringPreference(
key = appContext.getPreferenceKey(R.string.pref_key_tracking_protection_custom_cookies_select),
@@ -1197,11 +1197,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
+ featureFlag = false,
default = { feltPrivateBrowsingEnabled },
)
private val userNeedsToVisitInstallableSites: Boolean
- get() = pwaInstallableVisitCount.underMaxCount()
+ get() = false
@@ -909,7 +909,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var shouldShowCookieBannersCFR by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_cookie_banners_action_popup),
- featureFlag = true,
+ featureFlag = false,
default = { shouldShowCookieBannerUI },
)
val shouldShowPwaCfr: Boolean
get() {
- if (!canShowCfr) return false
+ return false
// We only want to show this on the 3rd time a user visits a site
if (userNeedsToVisitInstallableSites) return false
@@ -920,7 +920,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@@ -1217,41 +1217,41 @@ class Settings(private val appContext: Context) : PreferencesHolder {
return !userKnowsAboutPwas
}
- var userKnowsAboutPwas by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_user_knows_about_pwa),
var hasShownTabSwipeCFR by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_toolbar_has_shown_tab_swipe_cfr),
- default = false,
- )
+ var userKnowsAboutPwas = true
+// 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),
val blockCookiesSelectionInCustomTrackingProtection by stringPreference(
@@ -1219,12 +1219,12 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var userKnowsAboutPwas by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_user_knows_about_pwa),
- default = false,
+ default = true,
)
var shouldShowOpenInAppBanner by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_open_in_app_banner),
- default = true,
- )
+ var shouldShowOpenInAppBanner = false
+// appContext.getPreferenceKey(R.string.pref_key_should_show_open_in_app_banner),
+// default = true,
+// )
+ default = false,
)
val shouldShowOpenInAppCfr: Boolean
- get() = canShowCfr && shouldShowOpenInAppBanner
+ get() = false
@@ -1232,17 +1232,17 @@ class Settings(private val appContext: Context) : PreferencesHolder {
- var shouldShowAutoCloseTabsBanner by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_should_show_auto_close_tabs_banner),
var shouldShowAutoCloseTabsBanner by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_auto_close_tabs_banner),
- default = true,
- )
+ var shouldShowAutoCloseTabsBanner = false
+// 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),
var shouldShowLockPbmBanner by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_lock_pbm_banner),
- true,
- )
+ var shouldShowLockPbmBanner = false
+// 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),
var shouldShowInactiveTabsOnboardingPopup by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_inactive_tabs_popup),
- default = true,
- )
+ var shouldShowInactiveTabsOnboardingPopup = false
+// appContext.getPreferenceKey(R.string.pref_key_should_show_inactive_tabs_popup),
+// default = true,
+// )
+ default = false,
)
/**
* Indicates if the auto-close dialog for inactive tabs has been dismissed before.
@@ -1250,7 +1250,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var hasInactiveTabsAutoCloseDialogBeenDismissed by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_has_inactive_tabs_auto_close_dialog_dismissed),
var hasInactiveTabsAutoCloseDialogBeenDismissed by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_has_inactive_tabs_auto_close_dialog_dismissed),
- default = false,
- )
+ var hasInactiveTabsAutoCloseDialogBeenDismissed = true
+// appContext.getPreferenceKey(R.string.pref_key_has_inactive_tabs_auto_close_dialog_dismissed),
+// default = false,
+// )
+ default = true,
)
/**
* Indicates if the auto-close dialog should be visible based on
@@ -1260,7 +1260,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* and if the auto-close setting is already set to [closeTabsAfterOneMonth].
@@ -1671,7 +1671,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
fun shouldShowInactiveTabsAutoCloseDialog(numbersOfTabs: Int): Boolean {
- return !hasInactiveTabsAutoCloseDialogBeenDismissed &&
+ return false &&
numbersOfTabs >= INACTIVE_TAB_MINIMUM_TO_SHOW_AUTO_CLOSE_DIALOG &&
!closeTabsAfterOneMonth
}
@@ -1669,11 +1669,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if sync onboarding CFR should be shown.
*/
- var showSyncCFR by lazyFeatureFlagPreference(
- appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
var showSyncCFR by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
- featureFlag = true,
- default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
- )
+ var showSyncCFR = false
+// appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
+// featureFlag = true,
+// default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
+// )
+ featureFlag = false,
default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
)
/**
* Indicates if home onboarding dialog should be shown.
@@ -1887,10 +1887,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the search bar CFR should be displayed to the user.
@@ -1906,7 +1906,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var shouldShowSearchBarCFR by booleanPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_should_searchbar_cfr),
- default = false,
- )
+ var shouldShowSearchBarCFR = false
+// key = appContext.getPreferenceKey(R.string.pref_key_should_searchbar_cfr),
+// default = false,
+// )
/**
* Indicates whether or not to use remote server search configuration.
@@ -1904,10 +1904,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the menu CFR should be displayed to the user.
*/
- var shouldShowMenuCFR by booleanPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_menu_cfr),
var shouldShowMenuCFR by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_menu_cfr),
- default = true,
- )
+ var shouldShowMenuCFR = false
+// key = appContext.getPreferenceKey(R.string.pref_key_menu_cfr),
+// default = true,
+// )
+ default = false,
)
/**
* Get the current mode for how https-only is enabled.
@@ -2118,10 +2118,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates first time engaging with signup
@@ -2120,7 +2120,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var isFirstTimeEngagingWithSignup: Boolean by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_first_time_engage_with_signup),
var isFirstTimeEngagingWithSignup: Boolean by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_first_time_engage_with_signup),
- default = true,
- )
+ var isFirstTimeEngagingWithSignup: Boolean = false
+// appContext.getPreferenceKey(R.string.pref_key_first_time_engage_with_signup),
+// default = true,
+// )
+ default = false,
)
/**
* Indicates if the user has chosen to show sponsored search suggestions in the awesomebar.
@@ -2273,7 +2273,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
val shouldShowSetAsDefaultPrompt: Boolean
@@ -321,42 +193,31 @@ index 9197b274db..2b38b6598d 100644
DAYS_BETWEEN_DEFAULT_BROWSER_PROMPTS * ONE_DAY_MS &&
numberOfSetAsDefaultPromptShownTimes < MAX_NUMBER_OF_DEFAULT_BROWSER_PROMPTS &&
coldStartsBetweenSetAsDefaultPrompts >= APP_COLD_STARTS_TO_SHOW_DEFAULT_PROMPT
@@ -2434,44 +2434,44 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the user has completed the setup step for choosing the toolbar location
@@ -2436,7 +2436,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var hasCompletedSetupStepToolbar by booleanPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_setup_step_toolbar),
var hasCompletedSetupStepToolbar by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_setup_step_toolbar),
- default = false,
- )
+ var hasCompletedSetupStepToolbar = true
+// key = appContext.getPreferenceKey(R.string.pref_key_setup_step_toolbar),
+// default = false,
+// )
+ default = true,
)
/**
* Indicates if the user has completed the setup step for choosing the theme
@@ -2444,7 +2444,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var hasCompletedSetupStepTheme by booleanPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_setup_step_theme),
var hasCompletedSetupStepTheme by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_setup_step_theme),
- default = false,
- )
+ var hasCompletedSetupStepTheme = true
+// key = appContext.getPreferenceKey(R.string.pref_key_setup_step_theme),
+// default = false,
+// )
+ default = true,
)
/**
* Indicates if the user has completed the setup step for exploring extensions
@@ -2452,16 +2452,16 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var hasCompletedSetupStepExtensions by booleanPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_setup_step_extensions),
var hasCompletedSetupStepExtensions by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_setup_step_extensions),
- default = false,
- )
+ var hasCompletedSetupStepExtensions = true
+// key = appContext.getPreferenceKey(R.string.pref_key_setup_step_extensions),
+// default = false,
+// )
+ default = true,
)
/**
* Indicates if this is the default browser.
@@ -372,21 +233,11 @@ index 9197b274db..2b38b6598d 100644
/**
* Indicates whether or not to show the checklist feature.
*/
- var showSetupChecklist by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_setup_checklist_complete),
- default = {
- FxNimbus.features.setupChecklist.value().enabled &&
- canShowAddSearchWidgetPrompt(AppWidgetManager.getInstance(appContext))
- },
@@ -2472,6 +2472,6 @@ class Settings(private val appContext: Context) : PreferencesHolder {
FxNimbus.features.setupChecklist.value().enabled &&
canShowAddSearchWidgetPrompt(AppWidgetManager.getInstance(appContext))
},
- featureFlag = true,
- )
+ var showSetupChecklist = false
+// key = appContext.getPreferenceKey(R.string.pref_key_setup_checklist_complete),
+// default = {
+// FxNimbus.features.setupChecklist.value().enabled &&
+// canShowAddSearchWidgetPrompt(AppWidgetManager.getInstance(appContext))
+// },
+// featureFlag = true,
+// )
+ featureFlag = false,
)
}

View File

@@ -14,10 +14,10 @@ index 81bf2dd7e2..7a43fac926 100644
private const val SPOCS_ENDPOINT_DELETE_PROFILE_PATH = "user"
private const val SPOCS_PROXY_VERSION_KEY = "version"
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/pocket/ContentRecommendationsFeatureHelper.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/pocket/ContentRecommendationsFeatureHelper.kt
index 9e4f378574..ccc52008f5 100644
index 9e4f378574..f09791f066 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/pocket/ContentRecommendationsFeatureHelper.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/pocket/ContentRecommendationsFeatureHelper.kt
@@ -44,14 +44,14 @@ object ContentRecommendationsFeatureHelper {
@@ -44,7 +44,7 @@ object ContentRecommendationsFeatureHelper {
fun isPocketRecommendationsFeatureEnabled(context: Context): Boolean {
val langTag = LocaleManager.getCurrentLocale(context)
?.toLanguageTag() ?: getSystemDefault().toLanguageTag()
@@ -25,14 +25,6 @@ index 9e4f378574..ccc52008f5 100644
+ return false && POCKET_SUPPORTED_LOCALES.contains(langTag)
}
/**
* Show Pocket sponsored stories in between Pocket recommended stories on home.
*/
fun isPocketSponsoredStoriesFeatureEnabled(context: Context): Boolean {
- return isPocketRecommendationsFeatureEnabled(context)
+ return false && isPocketRecommendationsFeatureEnabled(context)
}
/**
@@ -61,6 +61,6 @@ object ContentRecommendationsFeatureHelper {
fun isContentRecommendationsFeatureEnabled(context: Context): Boolean {
@@ -43,7 +35,7 @@ index 9e4f378574..ccc52008f5 100644
}
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
index 43bea16286..84ac3c7d2b 100644
index 43bea16286..78b04620cc 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
@@ -114,6 +114,7 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
@@ -54,86 +46,3 @@ index 43bea16286..84ac3c7d2b 100644
isChecked = context.settings().showContentRecommendations
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
@@ -199,7 +200,7 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
}
requirePreference<Preference>(R.string.pref_key_custom_sponsored_stories_parameters).apply {
- isVisible = Config.channel.isNightlyOrDebug
+ isVisible = false
}
requirePreference<SwitchPreference>(R.string.pref_key_remote_server_prod).apply {
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 9197b274db..88ab712f7d 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
@@ -1732,20 +1732,20 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the Pocket recommended stories homescreen section should be shown.
*/
- var showPocketRecommendationsFeature by lazyFeatureFlagPreference(
- appContext.getPreferenceKey(R.string.pref_key_pocket_homescreen_recommendations),
- featureFlag = ContentRecommendationsFeatureHelper.isPocketRecommendationsFeatureEnabled(appContext),
- default = { homescreenSections[HomeScreenSection.POCKET] == true },
- )
+ var showPocketRecommendationsFeature = false
+// appContext.getPreferenceKey(R.string.pref_key_pocket_homescreen_recommendations),
+// featureFlag = ContentRecommendationsFeatureHelper.isPocketRecommendationsFeatureEnabled(appContext),
+// default = { homescreenSections[HomeScreenSection.POCKET] == true },
+// )
/**
* Indicates if the Pocket recommendations homescreen section should also show sponsored stories.
*/
- val showPocketSponsoredStories by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_pocket_sponsored_stories),
- default = { homescreenSections[HomeScreenSection.POCKET_SPONSORED_STORIES] == true },
- featureFlag = ContentRecommendationsFeatureHelper.isPocketSponsoredStoriesFeatureEnabled(appContext),
- )
+ val showPocketSponsoredStories = false
+// key = appContext.getPreferenceKey(R.string.pref_key_pocket_sponsored_stories),
+// default = { homescreenSections[HomeScreenSection.POCKET_SPONSORED_STORIES] == true },
+// featureFlag = ContentRecommendationsFeatureHelper.isPocketSponsoredStoriesFeatureEnabled(appContext),
+// )
/**
* Get the profile id to use in the sponsored stories communications with the Pocket endpoint.
@@ -1768,11 +1768,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if Merino content recommendations should be shown.
*/
- var showContentRecommendations by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_pocket_content_recommendations),
- default = { FxNimbus.features.merinoRecommendations.value().enabled },
- featureFlag = ContentRecommendationsFeatureHelper.isContentRecommendationsFeatureEnabled(appContext),
- )
+ var showContentRecommendations = false
+// key = appContext.getPreferenceKey(R.string.pref_key_pocket_content_recommendations),
+// default = { FxNimbus.features.merinoRecommendations.value().enabled },
+// featureFlag = ContentRecommendationsFeatureHelper.isContentRecommendationsFeatureEnabled(appContext),
+// )
/**
* Whether or not to display the Pocket sponsored stories parameter secret settings.
diff --git a/mobile/android/fenix/app/src/main/res/xml/home_preferences.xml b/mobile/android/fenix/app/src/main/res/xml/home_preferences.xml
index 4fd1f8945a..0044115440 100644
--- a/mobile/android/fenix/app/src/main/res/xml/home_preferences.xml
+++ b/mobile/android/fenix/app/src/main/res/xml/home_preferences.xml
@@ -29,13 +29,15 @@
<androidx.preference.SwitchPreference
android:key="@string/pref_key_pocket_homescreen_recommendations"
- android:title="@string/customize_toggle_pocket_3" />
+ android:title="@string/customize_toggle_pocket_3"
+ app:isPreferenceVisible="false" />
<androidx.preference.CheckBoxPreference
android:dependency="@string/pref_key_pocket_homescreen_recommendations"
android:layout="@layout/checkbox_left_sub_preference"
android:key="@string/pref_key_pocket_sponsored_stories"
- android:title="@string/customize_toggle_pocket_sponsored" />
+ android:title="@string/customize_toggle_pocket_sponsored"
+ app:isPreferenceVisible="false" />
<androidx.preference.Preference
android:key="@string/pref_key_wallpapers"

View File

@@ -1,5 +1,5 @@
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 9197b274db..2a82317df7 100644
index 9197b274db..27677eb17c 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
@@ -458,7 +458,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@@ -20,20 +20,15 @@ index 9197b274db..2a82317df7 100644
)
/**
@@ -2042,10 +2042,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if Recent Search Suggestions are enabled.
@@ -2044,7 +2044,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var isRecentSearchesVisible by lazyFeatureFlagPreference(
+ var isRecentSearchesVisible by booleanPreference(
var isRecentSearchesVisible by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_recent_searches),
- default = { FxNimbus.features.recentSearches.value().enabled },
- featureFlag = true,
+ default = true,
+// featureFlag = true,
+ default = { true },
featureFlag = true,
)
/**
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 f7ca109331..e55f3b2beb 100644
--- a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml

View File

@@ -12,23 +12,15 @@ index 43bea16286..550de3f6ec 100644
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
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 9197b274db..2c274d4ddf 100644
index 9197b274db..8cc210f86c 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
@@ -1895,11 +1895,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates whether or not to use remote server search configuration.
*/
- var useRemoteSearchConfiguration by lazyFeatureFlagPreference(
- key = appContext.getPreferenceKey(R.string.pref_key_use_remote_search_configuration),
- default = { FxNimbus.features.remoteSearchConfiguration.value().enabled },
@@ -1898,7 +1898,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var useRemoteSearchConfiguration by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_use_remote_search_configuration),
default = { FxNimbus.features.remoteSearchConfiguration.value().enabled },
- featureFlag = true,
- )
+ var useRemoteSearchConfiguration = false
+// key = appContext.getPreferenceKey(R.string.pref_key_use_remote_search_configuration),
+// default = { FxNimbus.features.remoteSearchConfiguration.value().enabled },
+// featureFlag = true,
+// )
+ featureFlag = false,
)
/**
* Indicates if the menu CFR should be displayed to the user.

View File

@@ -1,5 +1,5 @@
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 9197b274db..493fb9d2ff 100644
index 9197b274db..7fb57d6f45 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
@@ -1141,7 +1141,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@@ -11,21 +11,15 @@ index 9197b274db..493fb9d2ff 100644
)
val shouldAutocompleteInAwesomebar by booleanPreference(
@@ -1183,10 +1183,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
val shouldShowRecentSearchSuggestions: Boolean
get() = recentSearchSuggestionsEnabled && isRecentSearchesVisible
@@ -1185,7 +1185,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
- var showSearchSuggestionsInPrivateOnboardingFinished by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_show_search_suggestions_in_private_onboarding),
var showSearchSuggestionsInPrivateOnboardingFinished by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_show_search_suggestions_in_private_onboarding),
- default = false,
- )
+ var showSearchSuggestionsInPrivateOnboardingFinished = true
+// 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 f7ca109331..f9820e2f98 100644
--- a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml

View File

@@ -1,5 +1,5 @@
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 9197b274db..2d4bd39e68 100644
index 9197b274db..940c1bed6e 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
@@ -1165,7 +1165,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@@ -11,20 +11,15 @@ index 9197b274db..2d4bd39e68 100644
)
/**
@@ -2033,10 +2033,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if Trending Search Suggestions are enabled.
@@ -2035,7 +2035,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var isTrendingSearchesVisible by lazyFeatureFlagPreference(
+ var isTrendingSearchesVisible by booleanPreference(
var isTrendingSearchesVisible by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_trending_searches),
- default = { FxNimbus.features.trendingSearches.value().enabled },
- featureFlag = true,
+ default = true,
+// featureFlag = true,
+ default = { true },
featureFlag = true,
)
/**
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 f7ca109331..67d00840f8 100644
--- a/mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml

View File

@@ -1,5 +1,5 @@
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
index 43bea16286..269d107b01 100644
index 43bea16286..b23d2531db 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
@@ -64,7 +64,7 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
@@ -11,19 +11,7 @@ index 43bea16286..269d107b01 100644
isChecked = context.settings().shouldUseComposableToolbar
onPreferenceChangeListener = SharedPreferenceUpdater()
}
@@ -76,29 +76,31 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_compose_logins).apply {
+ isVisible = true
isChecked = context.settings().enableComposeLogins
onPreferenceChangeListener = SharedPreferenceUpdater()
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_compose_homepage).apply {
+ isVisible = true
isChecked = context.settings().enableComposeHomepage
onPreferenceChangeListener = SharedPreferenceUpdater()
@@ -86,19 +86,19 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_menu_redesign).apply {
@@ -46,7 +34,7 @@ index 43bea16286..269d107b01 100644
isChecked = context.settings().enableHomepageAsNewTab
onPreferenceChangeListener = SharedPreferenceUpdater()
}
@@ -124,7 +126,7 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
@@ -124,7 +124,7 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_unified_trust_panel).apply {
@@ -56,106 +44,67 @@ index 43bea16286..269d107b01 100644
onPreferenceChangeListener = SharedPreferenceUpdater()
}
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 9197b274db..dcd1cc146d 100644
index 9197b274db..48a36c3810 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
@@ -477,10 +477,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Returns true if shortcut suggestions feature should be shown to the user.
@@ -479,7 +479,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var isShortcutSuggestionsVisible by lazyFeatureFlagPreference(
+ var isShortcutSuggestionsVisible by booleanPreference(
var isShortcutSuggestionsVisible by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_shortcuts_suggestions),
- default = { FxNimbus.features.topSitesSuggestions.value().enabled },
- featureFlag = true,
+ default = true,
+// featureFlag = true,
+ default = { true },
featureFlag = true,
)
/**
@@ -1870,18 +1870,18 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = true,
)
- val feltPrivateBrowsingEnabled by lazyFeatureFlagPreference(
+ val feltPrivateBrowsingEnabled by booleanPreference(
@@ -1874,13 +1874,13 @@ class Settings(private val appContext: Context) : PreferencesHolder {
key = appContext.getPreferenceKey(R.string.pref_key_should_enable_felt_privacy),
- featureFlag = true,
- default = {
featureFlag = true,
default = {
- FxNimbus.features.privateBrowsing.value().feltPrivacyEnabled
- },
+// featureFlag = true,
+ default = true,
+// FxNimbus.features.privateBrowsing.value().feltPrivacyEnabled
+// },
+ true
},
)
- var shouldUseComposableToolbar by lazyFeatureFlagPreference(
+ var shouldUseComposableToolbar by booleanPreference(
var shouldUseComposableToolbar by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_composable_toolbar),
- default = { FxNimbus.features.composableToolbar.value().enabled },
- featureFlag = true,
+ default = false,
+// featureFlag = true,
+ default = { false },
featureFlag = true,
)
/**
@@ -1989,37 +1989,37 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the Compose Homepage is enabled.
@@ -1991,7 +1991,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var enableComposeHomepage by lazyFeatureFlagPreference(
+ var enableComposeHomepage by booleanPreference(
var enableComposeHomepage by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_compose_homepage),
- default = { FxNimbus.features.composeHomepage.value().enabled },
- featureFlag = true,
+ default = false,
+// featureFlag = true,
+ default = { false },
featureFlag = true,
)
/**
* Indicates if the menu redesign is enabled.
@@ -2000,7 +2000,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var enableMenuRedesign by lazyFeatureFlagPreference(
+ var enableMenuRedesign by booleanPreference(
var enableMenuRedesign by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_menu_redesign),
- default = { FxNimbus.features.menuRedesign.value().enabled },
- featureFlag = true,
+ default = false,
+// featureFlag = true,
+ default = { false },
featureFlag = true,
)
/**
* Indicates if the Homepage as a New Tab is enabled.
@@ -2009,7 +2009,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var enableHomepageAsNewTab by lazyFeatureFlagPreference(
+ var enableHomepageAsNewTab by booleanPreference(
var enableHomepageAsNewTab by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_homepage_as_new_tab),
- default = { FxNimbus.features.homepageAsNewTab.value().enabled },
- featureFlag = true,
+ default = false,
+// featureFlag = true,
+ default = { false },
featureFlag = true,
)
/**
* Indicates if the Homepage Search Bar is enabled.
@@ -2018,7 +2018,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var enableHomepageSearchBar by lazyFeatureFlagPreference(
+ var enableHomepageSearchBar by booleanPreference(
var enableHomepageSearchBar by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_homepage_searchbar),
- default = { FxNimbus.features.homepageSearchBar.value().enabled },
- featureFlag = true,
+ default = false,
+// featureFlag = true,
+ default = { false },
featureFlag = true,
)
/**
@@ -2027,7 +2027,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var enableUnifiedTrustPanel by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_unified_trust_panel),
- default = FeatureFlags.UNIFIED_TRUST_PANEL,
+ default = false,
)
/**

View File

@@ -18,7 +18,7 @@ index d897b9af6f..086f87d87b 100644
+// isRecoverable
}
diff --git a/mobile/android/android-components/components/lib/crash/src/main/java/mozilla/components/lib/crash/service/GleanCrashReporterService.kt b/mobile/android/android-components/components/lib/crash/src/main/java/mozilla/components/lib/crash/service/GleanCrashReporterService.kt
index 8efdd24f23..867241ae04 100644
index 8efdd24f23..99107e9307 100644
--- a/mobile/android/android-components/components/lib/crash/src/main/java/mozilla/components/lib/crash/service/GleanCrashReporterService.kt
+++ b/mobile/android/android-components/components/lib/crash/src/main/java/mozilla/components/lib/crash/service/GleanCrashReporterService.kt
@@ -100,7 +100,7 @@ class GleanCrashReporterService(
@@ -35,98 +35,42 @@ index 8efdd24f23..867241ae04 100644
) : PingCause() {
override fun setMetricsLater() {
- GleanCrash.cause.setLater("os_fault")
- remoteType?.let { GleanCrash.remoteType.setLater(it) }
- minidumpHash?.let { GleanCrash.minidumpSha256Hash.setLater(it) }
+// GleanCrash.cause.setLater("os_fault")
+// remoteType?.let { GleanCrash.remoteType.setLater(it) }
+// minidumpHash?.let { GleanCrash.minidumpSha256Hash.setLater(it) }
+/* GleanCrash.cause.setLater("os_fault")
remoteType?.let { GleanCrash.remoteType.setLater(it) }
minidumpHash?.let { GleanCrash.minidumpSha256Hash.setLater(it) }
- extras?.let(::setExtraMetrics)
+// extras?.let(::setExtraMetrics)
+ extras?.let(::setExtraMetrics)*/
}
private fun setExtraMetrics(extras: JsonObject) {
@@ -359,46 +359,46 @@ class GleanCrashReporterService(
@@ -359,7 +359,7 @@ class GleanCrashReporterService(
// Perform all processing up-front in case an unexpected exception occurs. We don't
// want to partially set Glean metrics. The Glean metric functions do not throw
// exceptions.
- val setMetrics = cause.prepareSetMetrics()
- var setBreadcrumbs = {}
- if (breadcrumbs.isNotEmpty()) {
- val value = Json.decodeFromJsonElement<GleanCrash.BreadcrumbsObject>(
- JsonArray(
- breadcrumbs.map { breadcrumb ->
- JsonObject(
- mapOf(
- "timestamp" to JsonPrimitive(breadcrumb.timestamp),
- "category" to JsonPrimitive(breadcrumb.category),
- "type" to JsonPrimitive(breadcrumb.type),
- "level" to JsonPrimitive(breadcrumb.level),
- "message" to JsonPrimitive(breadcrumb.message),
- "data" to JsonArray(
- breadcrumb.data.map {
- JsonObject(
- mapOf(
- "key" to JsonPrimitive(it.key),
- "value" to JsonPrimitive(it.value),
- ),
- )
- },
- ),
- ),
- )
- },
- ),
- )
- setBreadcrumbs = { GleanCrash.breadcrumbs.set(value) }
+/* val setMetrics = cause.prepareSetMetrics()
var setBreadcrumbs = {}
if (breadcrumbs.isNotEmpty()) {
val value = Json.decodeFromJsonElement<GleanCrash.BreadcrumbsObject>(
@@ -388,17 +388,17 @@ class GleanCrashReporterService(
),
)
setBreadcrumbs = { GleanCrash.breadcrumbs.set(value) }
- }
+// val setMetrics = cause.prepareSetMetrics()
+// var setBreadcrumbs = {}
+// if (breadcrumbs.isNotEmpty()) {
+// val value = Json.decodeFromJsonElement<GleanCrash.BreadcrumbsObject>(
+// JsonArray(
+// breadcrumbs.map { breadcrumb ->
+// JsonObject(
+// mapOf(
+// "timestamp" to JsonPrimitive(breadcrumb.timestamp),
+// "category" to JsonPrimitive(breadcrumb.category),
+// "type" to JsonPrimitive(breadcrumb.type),
+// "level" to JsonPrimitive(breadcrumb.level),
+// "message" to JsonPrimitive(breadcrumb.message),
+// "data" to JsonArray(
+// breadcrumb.data.map {
+// JsonObject(
+// mapOf(
+// "key" to JsonPrimitive(it.key),
+// "value" to JsonPrimitive(it.value),
+// ),
+// )
+// },
+// ),
+// ),
+// )
+// },
+// ),
+// )
+// setBreadcrumbs = { GleanCrash.breadcrumbs.set(value) }
+// }
+ }*/
// Set all metrics and submit the ping. We are guaranteed to not throw any
// exceptions here, so the metrics will never be partially set.
- GleanEnvironment.uptime.setRawNanos(uptimeNanos)
- GleanCrash.processType.set(processType)
- GleanCrash.time.set(Date(timeMillis))
- GleanCrash.startup.set(startup)
- setMetrics()
- setBreadcrumbs()
+/* GleanEnvironment.uptime.setRawNanos(uptimeNanos)
GleanCrash.processType.set(processType)
GleanCrash.time.set(Date(timeMillis))
GleanCrash.startup.set(startup)
setMetrics()
setBreadcrumbs()
- Pings.crash.submit(reason)
+// GleanEnvironment.uptime.setRawNanos(uptimeNanos)
+// GleanCrash.processType.set(processType)
+// GleanCrash.time.set(Date(timeMillis))
+// GleanCrash.startup.set(startup)
+// setMetrics()
+// setBreadcrumbs()
+// Pings.crash.submit(reason)*/
+ Pings.crash.submit(reason)*/
}
}
}
@@ -139,121 +83,39 @@ index 8efdd24f23..867241ae04 100644
}
}
@@ -544,17 +544,17 @@ class GleanCrashReporterService(
@@ -544,7 +544,7 @@ class GleanCrashReporterService(
}
override fun record(crash: Crash.UncaughtExceptionCrash) {
- recordCrashAction(GleanCrashAction.Count(UNCAUGHT_EXCEPTION_KEY))
- recordCrashAction(
- GleanCrashAction.Ping(
- uptimeNanos = uptime(),
- processType = "main",
- timeMillis = crash.timestamp,
- reason = Pings.crashReasonCodes.crash,
- cause = GleanCrashAction.PingCause.JavaException(crash.throwable.toJson()),
- breadcrumbs = crash.breadcrumbs.map { it.toBreadcrumb() },
- ),
+/* recordCrashAction(GleanCrashAction.Count(UNCAUGHT_EXCEPTION_KEY))
recordCrashAction(
GleanCrashAction.Ping(
uptimeNanos = uptime(),
@@ -554,7 +554,7 @@ class GleanCrashReporterService(
cause = GleanCrashAction.PingCause.JavaException(crash.throwable.toJson()),
breadcrumbs = crash.breadcrumbs.map { it.toBreadcrumb() },
),
- )
+// recordCrashAction(GleanCrashAction.Count(UNCAUGHT_EXCEPTION_KEY))
+// recordCrashAction(
+// GleanCrashAction.Ping(
+// uptimeNanos = uptime(),
+// processType = "main",
+// timeMillis = crash.timestamp,
+// reason = Pings.crashReasonCodes.crash,
+// cause = GleanCrashAction.PingCause.JavaException(crash.throwable.toJson()),
+// breadcrumbs = crash.breadcrumbs.map { it.toBreadcrumb() },
+// ),
+// )
+ )*/
}
private fun getExtrasJson(path: String): JsonObject? {
@@ -633,50 +633,50 @@ class GleanCrashReporterService(
@@ -633,7 +633,7 @@ class GleanCrashReporterService(
}
override fun record(crash: Crash.NativeCodeCrash) {
- when (crash.processVisibility) {
- Crash.NativeCodeCrash.PROCESS_VISIBILITY_MAIN ->
- recordCrashAction(GleanCrashAction.Count(MAIN_PROCESS_NATIVE_CODE_CRASH_KEY))
- Crash.NativeCodeCrash.PROCESS_VISIBILITY_FOREGROUND_CHILD ->
- recordCrashAction(
- GleanCrashAction.Count(
- FOREGROUND_CHILD_PROCESS_NATIVE_CODE_CRASH_KEY,
- ),
- )
- Crash.NativeCodeCrash.PROCESS_VISIBILITY_BACKGROUND_CHILD ->
- recordCrashAction(
- GleanCrashAction.Count(
- BACKGROUND_CHILD_PROCESS_NATIVE_CODE_CRASH_KEY,
- ),
- )
- }
-
- val processType = crash.processType ?: "main"
-
- if (crash.minidumpPath != null && crash.extrasPath != null) {
- MinidumpAnalyzer.load()?.run(crash.minidumpPath, crash.extrasPath, false)
- }
-
- val extrasJson = crash.extrasPath?.let { getExtrasJson(it) }
-
- val minidumpHash = crash.minidumpPath?.let { calculateMinidumpHash(it) }
-
- recordCrashAction(
- GleanCrashAction.Ping(
- uptimeNanos = uptime(),
- processType = processType,
- timeMillis = crash.timestamp,
- reason = Pings.crashReasonCodes.crash,
- cause = GleanCrashAction.PingCause.OsFault(
- remoteType = crash.remoteType,
- extras = extrasJson,
- minidumpHash = minidumpHash,
- ),
- breadcrumbs = crash.breadcrumbs.map { it.toBreadcrumb() },
- ),
+/* when (crash.processVisibility) {
Crash.NativeCodeCrash.PROCESS_VISIBILITY_MAIN ->
recordCrashAction(GleanCrashAction.Count(MAIN_PROCESS_NATIVE_CODE_CRASH_KEY))
Crash.NativeCodeCrash.PROCESS_VISIBILITY_FOREGROUND_CHILD ->
@@ -673,10 +673,10 @@ class GleanCrashReporterService(
),
breadcrumbs = crash.breadcrumbs.map { it.toBreadcrumb() },
),
- )
+// when (crash.processVisibility) {
+// Crash.NativeCodeCrash.PROCESS_VISIBILITY_MAIN ->
+// recordCrashAction(GleanCrashAction.Count(MAIN_PROCESS_NATIVE_CODE_CRASH_KEY))
+// Crash.NativeCodeCrash.PROCESS_VISIBILITY_FOREGROUND_CHILD ->
+// recordCrashAction(
+// GleanCrashAction.Count(
+// FOREGROUND_CHILD_PROCESS_NATIVE_CODE_CRASH_KEY,
+// ),
+// )
+// Crash.NativeCodeCrash.PROCESS_VISIBILITY_BACKGROUND_CHILD ->
+// recordCrashAction(
+// GleanCrashAction.Count(
+// BACKGROUND_CHILD_PROCESS_NATIVE_CODE_CRASH_KEY,
+// ),
+// )
+// }
+
+// val processType = crash.processType ?: "main"
+
+// if (crash.minidumpPath != null && crash.extrasPath != null) {
+// MinidumpAnalyzer.load()?.run(crash.minidumpPath, crash.extrasPath, false)
+// }
+
+// val extrasJson = crash.extrasPath?.let { getExtrasJson(it) }
+
+// val minidumpHash = crash.minidumpPath?.let { calculateMinidumpHash(it) }
+
+// recordCrashAction(
+// GleanCrashAction.Ping(
+// uptimeNanos = uptime(),
+// processType = processType,
+// timeMillis = crash.timestamp,
+// reason = Pings.crashReasonCodes.crash,
+// cause = GleanCrashAction.PingCause.OsFault(
+// remoteType = crash.remoteType,
+// extras = extrasJson,
+// minidumpHash = minidumpHash,
+// ),
+// breadcrumbs = crash.breadcrumbs.map { it.toBreadcrumb() },
+// ),
+// )
+ )*/
}
override fun record(throwable: Throwable) {
@@ -310,7 +172,7 @@ index d9a6045423..2f788179ee 100644
try {
def token = new File("${rootDir}/.sentry_token").text.trim()
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 13db9f3c83..37fa89c98f 100644
index 13db9f3c83..6ac6401266 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
@@ -504,10 +504,10 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
@@ -318,13 +180,11 @@ index 13db9f3c83..37fa89c98f 100644
private fun setupCrashReporting() {
- components
- .analytics
- .crashReporter
+/* components
.analytics
.crashReporter
- .install(this)
+// components
+// .analytics
+// .crashReporter
+// .install(this)
+ .install(this)*/
}
protected open fun initializeNimbus() {
@@ -399,7 +259,7 @@ index 36d4b4c349..f9ff9db3bf 100644
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt
index 6725aa64a0..724b1674cf 100644
index 6725aa64a0..d3e7f17a86 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt
@@ -84,13 +84,13 @@ class SearchDialogController(
@@ -407,45 +267,21 @@ index 6725aa64a0..724b1674cf 100644
when (url) {
- "about:crashes" -> {
+// "about:crashes" -> {
+/* "about:crashes" -> {
// The list of past crashes can be accessed via "settings > about", but desktop and
// fennec users may be used to navigating to "about:crashes". So we intercept this here
// and open the crash list activity instead.
- activity.startActivity(Intent(activity, CrashListActivity::class.java))
- store.dispatch(AwesomeBarAction.EngagementFinished(abandoned = false))
activity.startActivity(Intent(activity, CrashListActivity::class.java))
store.dispatch(AwesomeBarAction.EngagementFinished(abandoned = false))
- }
+// activity.startActivity(Intent(activity, CrashListActivity::class.java))
+// store.dispatch(AwesomeBarAction.EngagementFinished(abandoned = false))
+// }
+ }*/
"about:addons" -> {
val directions =
SearchDialogFragmentDirections.actionGlobalAddonsManagementFragment()
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 9197b274db..8e72f5bbf0 100644
index 9197b274db..77d6eee674 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
@@ -168,7 +168,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@VisibleForTesting
internal val isCrashReportEnabledInBuild: Boolean =
- BuildConfig.CRASH_REPORTING && Config.channel.isReleased
+ false
override val preferences: SharedPreferences =
appContext.getSharedPreferences(FENIX_PREFERENCES, MODE_PRIVATE)
@@ -369,10 +369,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
)
val isCrashReportingEnabled: Boolean
- get() = isCrashReportEnabledInBuild &&
+ get() = false &&
preferences.getBoolean(
appContext.getPreferenceKey(R.string.pref_key_crash_reporter),
- true,
+ false,
)
val isRemoteDebuggingEnabled by booleanPreference(
@@ -2314,10 +2314,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* A user preference indicating that crash reports should always be automatically sent. This can be updated
* through the unsubmitted crash dialog or through data choice preferences.

View File

@@ -1,24 +1,16 @@
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt
index 6611dd53cd..1254a626ac 100644
index 6611dd53cd..856d86e071 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt
@@ -172,11 +172,11 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
return
@@ -173,7 +173,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
}
- if (
if (
- !FxNimbus.features.translations.value().mainFlowToolbarEnabled
- ) {
- return
- }
+// if (
+// !FxNimbus.features.translations.value().mainFlowToolbarEnabled
+// ) {
+// return
+// }
val translationsAction = Toolbar.ActionButton(
AppCompatResources.getDrawable(
+ false
) {
return
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/MenuDialogFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/MenuDialogFragment.kt
index 1443661bb8..fbec347f11 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/MenuDialogFragment.kt
@@ -192,7 +184,7 @@ index 472e3bf5a8..b2a4842c16 100644
initialFrom = translationsDialogState?.initialFrom,
onBackClicked = { translationsVisibility = true },
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 9197b274db..326d068e94 100644
index 9197b274db..c4ca3cb242 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
@@ -225,10 +225,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@@ -210,31 +202,21 @@ index 9197b274db..326d068e94 100644
var utmParamsKnown by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_utm_params_known),
@@ -316,10 +316,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the wallpaper onboarding dialog should be shown.
*/
- var showWallpaperOnboarding by lazyFeatureFlagPreference(
+ var showWallpaperOnboarding by booleanPreference(
@@ -319,7 +319,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showWallpaperOnboarding by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_wallpapers_onboarding),
- featureFlag = true,
featureFlag = true,
- default = { mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true },
+// featureFlag = true,
+ default = true,
+ default = { true },
)
var openLinksInAPrivateTab by booleanPreference(
@@ -332,10 +332,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = false,
)
- var privateBrowsingLockedFeatureEnabled by lazyFeatureFlagPreference(
+ var privateBrowsingLockedFeatureEnabled by booleanPreference(
@@ -335,7 +335,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var privateBrowsingLockedFeatureEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_private_browsing_locked_enabled),
- featureFlag = true,
featureFlag = true,
- default = { FxNimbus.features.privateBrowsingLock.value().enabled },
+// featureFlag = true,
+ default = false,
+ default = { false },
)
var privateBrowsingModeLocked by booleanPreference(
@@ -268,17 +250,12 @@ index 9197b274db..326d068e94 100644
var isFirstNimbusRun: Boolean by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_is_first_run),
@@ -1678,10 +1678,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if home onboarding dialog should be shown.
*/
- var showHomeOnboardingDialog by lazyFeatureFlagPreference(
+ var showHomeOnboardingDialog by booleanPreference(
@@ -1681,7 +1681,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showHomeOnboardingDialog by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_home_onboarding_dialog),
- featureFlag = true,
featureFlag = true,
- default = { mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true },
+// featureFlag = true,
+ default = true,
+ default = { true },
)
/**
@@ -291,21 +268,16 @@ index 9197b274db..326d068e94 100644
/**
* Returns the height of the bottom toolbar.
diff --git a/mobile/android/fenix/app/src/main/res/xml/preferences.xml b/mobile/android/fenix/app/src/main/res/xml/preferences.xml
index 4c6b14bf87..c74795e584 100644
--- a/mobile/android/fenix/app/src/main/res/xml/preferences.xml
+++ b/mobile/android/fenix/app/src/main/res/xml/preferences.xml
@@ -227,11 +227,11 @@
app:iconSpaceReserved="false"
android:title="@string/preferences_debug_info"
app:isPreferenceVisible="false" />
- <androidx.preference.Preference
+<!-- <androidx.preference.Preference
android:key="@string/pref_key_nimbus_experiments"
app:iconSpaceReserved="false"
android:title="@string/preferences_nimbus_experiments"
- app:isPreferenceVisible="false" />
+ app:isPreferenceVisible="false" /> -->
<androidx.preference.Preference
android:key="@string/pref_key_start_profiler"
app:iconSpaceReserved="false"
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
index 325e5d2141..7d4277ef8e 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
@@ -549,7 +549,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
with(requireContext().settings()) {
findPreference<Preference>(
getPreferenceKey(R.string.pref_key_nimbus_experiments),
- )?.isVisible = showSecretDebugMenuThisSession
+ )?.isVisible = false
findPreference<Preference>(
getPreferenceKey(R.string.pref_key_debug_settings),
)?.isVisible = showSecretDebugMenuThisSession

View File

@@ -75,7 +75,7 @@ index d3b21828c2..edea7b4d0d 100644
val publicSuffixList by lazyMonitored { PublicSuffixList(context) }
val clipboardHandler by lazyMonitored { ClipboardHandler(context) }
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 cfbdaba62c..05f9735c6b 100644
index cfbdaba62c..8b07a2496c 100644
--- 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
@@ -64,14 +64,14 @@ import mozilla.components.feature.search.SearchApplicationName
@@ -124,38 +124,21 @@ index cfbdaba62c..05f9735c6b 100644
LastMediaAccessMiddleware(),
HistoryMetadataMiddleware(historyMetadataService),
SessionPrioritizationMiddleware(),
@@ -364,25 +364,25 @@ class Core(
@@ -364,7 +364,7 @@ class Core(
// Install the "icons" WebExtension to automatically load icons for every visited website.
icons.install(engine, this)
- CoroutineScope(Dispatchers.Main).launch {
- val readJson = { context.assets.readJSONObject("search/search_telemetry_v2.json") }
- val providerList = withContext(Dispatchers.IO) {
- SerpTelemetryRepository(
- rootStorageDirectory = context.filesDir,
- readJson = readJson,
- collectionName = COLLECTION_NAME,
- serverUrl = if (context.settings().useProductionRemoteSettingsServer) {
- REMOTE_PROD_ENDPOINT_URL
- } else {
- REMOTE_STAGE_ENDPOINT_URL
- },
- ).updateProviderList()
+/* CoroutineScope(Dispatchers.Main).launch {
val readJson = { context.assets.readJSONObject("search/search_telemetry_v2.json") }
val providerList = withContext(Dispatchers.IO) {
SerpTelemetryRepository(
@@ -377,12 +377,12 @@ class Core(
REMOTE_STAGE_ENDPOINT_URL
},
).updateProviderList()
- }
+// CoroutineScope(Dispatchers.Main).launch {
+// val readJson = { context.assets.readJSONObject("search/search_telemetry_v2.json") }
+// val providerList = withContext(Dispatchers.IO) {
+// SerpTelemetryRepository(
+// rootStorageDirectory = context.filesDir,
+// readJson = readJson,
+// collectionName = COLLECTION_NAME,
+// serverUrl = if (context.settings().useProductionRemoteSettingsServer) {
+// REMOTE_PROD_ENDPOINT_URL
+// } else {
+// REMOTE_STAGE_ENDPOINT_URL
+// },
+// ).updateProviderList()
+// }
+ }*/
// Install the "ads" WebExtension to get the links in an partner page.
- adsTelemetry.install(engine, this@apply, providerList)
+// adsTelemetry.install(engine, this@apply, providerList)
@@ -167,30 +150,21 @@ index cfbdaba62c..05f9735c6b 100644
WebNotificationFeature(
context,
@@ -434,17 +434,17 @@ class Core(
@@ -434,7 +434,7 @@ class Core(
BrowserIcons(context, client)
}
- val metrics by lazyMonitored {
- context.components.analytics.metrics
- }
+// val metrics by lazyMonitored {
+// context.components.analytics.metrics
+// }
+/* val metrics by lazyMonitored {
context.components.analytics.metrics
}
- val adsTelemetry by lazyMonitored {
- AdsTelemetry()
- }
+// val adsTelemetry by lazyMonitored {
+// AdsTelemetry()
+// }
@@ -444,7 +444,7 @@ class Core(
- val searchTelemetry by lazyMonitored {
- InContentTelemetry()
val searchTelemetry by lazyMonitored {
InContentTelemetry()
- }
+// val searchTelemetry by lazyMonitored {
+// InContentTelemetry()
+// }
+ }*/
/**
* Shortcut component for managing shortcuts on the device home screen.
@@ -305,7 +279,7 @@ index ea4ff1e0dd..1a63eba455 100644
}
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/MetricsStorage.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/MetricsStorage.kt
index 9d54f66a65..47c4244490 100644
index 9d54f66a65..ee9cc8e139 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/MetricsStorage.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/MetricsStorage.kt
@@ -13,7 +13,7 @@ import kotlinx.coroutines.withContext
@@ -317,14 +291,12 @@ index 9d54f66a65..47c4244490 100644
import org.mozilla.fenix.utils.Settings
import java.text.SimpleDateFormat
import java.util.Calendar
@@ -274,8 +274,8 @@ internal class DefaultMetricsStorage(
* - tracking is still enabled through Nimbus
@@ -275,7 +275,7 @@ internal class DefaultMetricsStorage(
*/
fun shouldSendGenerally(context: Context): Boolean {
- return context.settings().adjustCampaignId.isNotEmpty() &&
return context.settings().adjustCampaignId.isNotEmpty() &&
- FxNimbus.features.growthData.value().enabled
+ return false && context.settings().adjustCampaignId.isNotEmpty()
+// FxNimbus.features.growthData.value().enabled
+ false
}
fun getInstalledTime(context: Context): Long = context.packageManager
@@ -360,7 +332,7 @@ index 13db9f3c83..b0d4f44010 100644
// Attention: Do not invoke any code from a-s in this scope.
val megazordSetup = finishSetupMegazord()
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/nimbus/controller/NimbusBranchesController.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/nimbus/controller/NimbusBranchesController.kt
index c1b54d7f27..11b36c5949 100644
index c1b54d7f27..122a865c84 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/nimbus/controller/NimbusBranchesController.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/nimbus/controller/NimbusBranchesController.kt
@@ -16,7 +16,7 @@ import org.mozilla.fenix.compose.snackbar.SnackbarState
@@ -372,7 +344,7 @@ index c1b54d7f27..11b36c5949 100644
import org.mozilla.fenix.nimbus.NimbusBranchesAction
import org.mozilla.fenix.nimbus.NimbusBranchesFragment
import org.mozilla.fenix.nimbus.NimbusBranchesFragmentDirections
@@ -42,34 +42,34 @@ class NimbusBranchesController(
@@ -42,12 +42,12 @@ class NimbusBranchesController(
) : NimbusBranchesAdapterDelegate {
override fun onBranchItemClicked(branch: Branch) {
@@ -384,56 +356,12 @@ index c1b54d7f27..11b36c5949 100644
updateOptInState(branch)
- if (!telemetryEnabled && !experimentsEnabled) {
- context.getRootView()?.let { v ->
- Snackbar.make(
- snackBarParentView = v,
- snackbarState = SnackbarState(
- message = context.getString(R.string.experiments_snackbar),
- duration = SnackbarState.Duration.Preset.Long,
- action = Action(
- label = context.getString(R.string.experiments_snackbar_button),
- onClick = {
- navController.navigateWithBreadcrumb(
- directions = NimbusBranchesFragmentDirections
- .actionNimbusBranchesFragmentToDataChoicesFragment(),
- navigateFrom = "NimbusBranchesController",
- navigateTo = "ActionNimbusBranchesFragmentToDataChoicesFragment",
- crashReporter = context.components.analytics.crashReporter,
- )
- },
- ),
- ),
- ).show()
- }
- }
+// if (!telemetryEnabled && !experimentsEnabled) {
+// context.getRootView()?.let { v ->
+// Snackbar.make(
+// snackBarParentView = v,
+// snackbarState = SnackbarState(
+// message = context.getString(R.string.experiments_snackbar),
+// duration = SnackbarState.Duration.Preset.Long,
+// action = Action(
+// label = context.getString(R.string.experiments_snackbar_button),
+// onClick = {
+// navController.navigateWithBreadcrumb(
+// directions = NimbusBranchesFragmentDirections
+// .actionNimbusBranchesFragmentToDataChoicesFragment(),
+// navigateFrom = "NimbusBranchesController",
+// navigateTo = "ActionNimbusBranchesFragmentToDataChoicesFragment",
+// crashReporter = context.components.analytics.crashReporter,
+// )
+// },
+// ),
+// ),
+// ).show()
+// }
+// }
}
private fun updateOptInState(branch: Branch) {
+ if (false) {
context.getRootView()?.let { v ->
Snackbar.make(
snackBarParentView = v,
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
index e5ab956ac3..4db7ffc14c 100644
index e5ab956ac3..c4c45334dd 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/OnboardingFragment.kt
@@ -29,12 +29,12 @@ import mozilla.components.service.nimbus.messaging.use
@@ -456,21 +384,15 @@ index e5ab956ac3..4db7ffc14c 100644
val settings = requireContext().settings()
- viewLifecycleOwner.lifecycleScope.launch {
- initializeGlean(
- requireContext().applicationContext,
- logger,
- settings.isTelemetryEnabled,
- requireComponents.core.client,
- )
+/* viewLifecycleOwner.lifecycleScope.launch {
initializeGlean(
requireContext().applicationContext,
logger,
settings.isTelemetryEnabled,
requireComponents.core.client,
)
- }
+// viewLifecycleOwner.lifecycleScope.launch {
+// initializeGlean(
+// requireContext().applicationContext,
+// logger,
+// settings.isTelemetryEnabled,
+// requireComponents.core.client,
+// )
+// }
+ }*/
if (!settings.isTelemetryEnabled) {
- Pings.onboardingOptOut.setEnabled(true)
@@ -481,7 +403,7 @@ index e5ab956ac3..4db7ffc14c 100644
startMetricsIfEnabled(
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt
index 6725aa64a0..17dec89626 100644
index 6725aa64a0..ae0d1eb0b7 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/search/SearchDialogController.kt
@@ -97,10 +97,10 @@ class SearchDialogController(
@@ -489,13 +411,11 @@ index 6725aa64a0..17dec89626 100644
store.dispatch(AwesomeBarAction.EngagementFinished(abandoned = false))
}
- "about:glean" -> {
- val directions = SearchDialogFragmentDirections.actionGleanDebugToolsFragment()
- navController.navigate(directions)
+/* "about:glean" -> {
val directions = SearchDialogFragmentDirections.actionGleanDebugToolsFragment()
navController.navigate(directions)
- }
+// "about:glean" -> {
+// val directions = SearchDialogFragmentDirections.actionGleanDebugToolsFragment()
+// navController.navigate(directions)
+// }
+ }*/
"moz://a" -> openSearchOrUrl(
SupportUtils.getMozillaPageUrl(SupportUtils.MozillaPage.MANIFESTO),
)
@@ -513,10 +433,10 @@ index 43bea16286..8f460115af 100644
onPreferenceChangeListener =
Preference.OnPreferenceChangeListener { _, newValue ->
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 9197b274db..5cd8fcfa66 100644
index 9197b274db..a9ba779426 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
@@ -380,20 +380,20 @@ class Settings(private val appContext: Context) : PreferencesHolder {
@@ -380,19 +380,19 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = false,
)
@@ -538,17 +458,13 @@ index 9197b274db..5cd8fcfa66 100644
+// default = false,
+// )
- var hasMadeMarketingTelemetrySelection by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_marketing_telemetry_selection_made),
var hasMadeMarketingTelemetrySelection by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_marketing_telemetry_selection_made),
- default = false,
- )
+ var hasMadeMarketingTelemetrySelection = true
+// appContext.getPreferenceKey(R.string.pref_key_marketing_telemetry_selection_made),
+// default = false,
+// )
+ default = true,
)
var hasAcceptedTermsOfService by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_terms_accepted),
@@ -406,11 +406,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* sure that users who upgrade and had telemetry disabled don't start sending the
* daily usage ping telemetry.

View File

@@ -263,7 +263,7 @@ index d3b21828c2..787a899648 100644
)
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt
index 33e8704adc..7a772f7a50 100644
index 33e8704adc..4bb2a3f64b 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt
@@ -6,8 +6,8 @@ package org.mozilla.fenix.components
@@ -277,7 +277,7 @@ index 33e8704adc..7a772f7a50 100644
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.withContext
import org.mozilla.fenix.GleanMetrics.ReviewPrompt
@@ -45,24 +45,24 @@ class FenixReviewSettings(
@@ -45,11 +45,11 @@ class FenixReviewSettings(
* Controls the Review Prompt behavior.
*/
class ReviewPromptController(
@@ -287,34 +287,17 @@ index 33e8704adc..7a772f7a50 100644
private val timeNowInMillis: () -> Long = { System.currentTimeMillis() },
- private val tryPromptReview: suspend (Activity) -> Unit = { activity ->
- val flow = manager.requestReviewFlow()
-
- withContext(Main) {
- flow.addOnCompleteListener {
- if (it.isSuccessful) {
- manager.launchReviewFlow(activity, it.result)
- recordReviewPromptEvent(
- it.result.toString(),
- reviewSettings.numberOfAppLaunches,
- Date(),
- )
- }
- }
- }
+ private val tryPromptReview: suspend (Activity) -> Unit = { _ ->
+// val flow = manager.requestReviewFlow()
+
+// withContext(Main) {
+// flow.addOnCompleteListener {
+// if (it.isSuccessful) {
+// manager.launchReviewFlow(activity, it.result)
+// recordReviewPromptEvent(
+// it.result.toString(),
+// reviewSettings.numberOfAppLaunches,
+// Date(),
+// )
+// }
+// }
+// }
+/* val flow = manager.requestReviewFlow()
withContext(Main) {
flow.addOnCompleteListener {
@@ -62,7 +62,7 @@ class ReviewPromptController(
)
}
}
- }
+ }*/
},
) {
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
@@ -350,7 +333,7 @@ index 6312b65949..ec8b759397 100644
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt
index 233855f4c2..9679f5192a 100644
index 233855f4c2..db736fd18a 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt
@@ -6,8 +6,8 @@ package org.mozilla.fenix.components.metrics
@@ -377,7 +360,7 @@ index 233855f4c2..9679f5192a 100644
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.utils.Settings
import java.io.UnsupportedEncodingException
@@ -33,86 +33,86 @@ class InstallReferrerMetricsService(private val context: Context) : MetricsServi
@@ -33,10 +33,10 @@ class InstallReferrerMetricsService(private val context: Context) : MetricsServi
private val logger = Logger("InstallReferrerMetricsService")
override val type = MetricServiceType.Data
@@ -386,37 +369,16 @@ index 233855f4c2..9679f5192a 100644
override fun start() {
- if (context.settings().utmParamsKnown) {
- return
- }
-
- val timerId = PlayStoreAttribution.attributionTime.start()
- val client = InstallReferrerClient.newBuilder(context).build()
- referrerClient = client
-
- client.startConnection(
- object : InstallReferrerStateListener {
- override fun onInstallReferrerSetupFinished(responseCode: Int) {
- PlayStoreAttribution.attributionTime.stopAndAccumulate(timerId)
- val firstSession = FirstSessionPing(context)
- PlayStoreAttribution.responseCode.set(responseCode.toString())
- when (responseCode) {
+/* if (context.settings().utmParamsKnown) {
return
}
@@ -51,13 +51,13 @@ class InstallReferrerMetricsService(private val context: Context) : MetricsServi
val firstSession = FirstSessionPing(context)
PlayStoreAttribution.responseCode.set(responseCode.toString())
when (responseCode) {
- InstallReferrerClient.InstallReferrerResponse.OK -> {
+// if (context.settings().utmParamsKnown) {
+// return
+// }
+
+// val timerId = PlayStoreAttribution.attributionTime.start()
+// val client = InstallReferrerClient.newBuilder(context).build()
+// referrerClient = client
+
+// client.startConnection(
+// object : InstallReferrerStateListener {
+// override fun onInstallReferrerSetupFinished(responseCode: Int) {
+// PlayStoreAttribution.attributionTime.stopAndAccumulate(timerId)
+// val firstSession = FirstSessionPing(context)
+// PlayStoreAttribution.responseCode.set(responseCode.toString())
+// when (responseCode) {
+// InstallReferrerClient.InstallReferrerResponse.OK -> {
+ InstallReferrerClient.InstallReferrerResponse.OK -> {*/
// Connection established.
- val installReferrerResponse = try {
- client.installReferrer.installReferrer
@@ -426,65 +388,16 @@ index 233855f4c2..9679f5192a 100644
+// } catch (e: RemoteException) {
// We can't do anything about this.
- logger.error("Failed to retrieve install referrer response", e)
- null
- } catch (e: SecurityException) {
- logger.error("Failed to retrieve install referrer response", e)
- null
- }
-
- if (installReferrerResponse.isNullOrBlank()) {
- return
- }
-
- PlayStoreAttribution.installReferrerResponse.set(installReferrerResponse)
-
- val utmParams = UTMParams.parseUTMParameters(installReferrerResponse)
- if (FeatureFlags.META_ATTRIBUTION_ENABLED) {
- MetaParams.extractMetaAttribution(utmParams.content)
- ?.recordMetaAttribution()
- }
-
- utmParams.recordInstallReferrer(context.settings())
- context.settings().utmParamsKnown = true
-
- firstSession.checkAndSend()
- triggerPing()
- }
-
- InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED,
- InstallReferrerClient.InstallReferrerResponse.DEVELOPER_ERROR,
- InstallReferrerClient.InstallReferrerResponse.PERMISSION_ERROR,
+/* logger.error("Failed to retrieve install referrer response", e)
null
} catch (e: SecurityException) {
logger.error("Failed to retrieve install referrer response", e)
@@ -86,33 +86,33 @@ class InstallReferrerMetricsService(private val context: Context) : MetricsServi
InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED,
InstallReferrerClient.InstallReferrerResponse.DEVELOPER_ERROR,
InstallReferrerClient.InstallReferrerResponse.PERMISSION_ERROR,
- -> {
+// logger.error("Failed to retrieve install referrer response", e)
+// null
+// } catch (e: SecurityException) {
+// logger.error("Failed to retrieve install referrer response", e)
+// null
+// }
+
+// if (installReferrerResponse.isNullOrBlank()) {
+// return
+// }
+
+// PlayStoreAttribution.installReferrerResponse.set(installReferrerResponse)
+
+// val utmParams = UTMParams.parseUTMParameters(installReferrerResponse)
+// if (FeatureFlags.META_ATTRIBUTION_ENABLED) {
+// MetaParams.extractMetaAttribution(utmParams.content)
+// ?.recordMetaAttribution()
+// }
+
+// utmParams.recordInstallReferrer(context.settings())
+// context.settings().utmParamsKnown = true
+
+// firstSession.checkAndSend()
+// triggerPing()
+// }
+
+// InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED,
+// InstallReferrerClient.InstallReferrerResponse.DEVELOPER_ERROR,
+// InstallReferrerClient.InstallReferrerResponse.PERMISSION_ERROR,
+// -> {
+ -> {*/
// unrecoverable errors, but we still want to send the first-session ping.
- context.settings().utmParamsKnown = true
- firstSession.checkAndSend()
@@ -790,24 +703,18 @@ index e13ebe821f..4322aad38e 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 9197b274db..c3728d2f69 100644
index 9197b274db..b600d45fd5 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
@@ -1865,10 +1865,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the marketing onboarding card should be shown to the user.
@@ -1867,7 +1867,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var shouldShowMarketingOnboarding by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_should_show_marketing_onboarding),
var shouldShowMarketingOnboarding by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_marketing_onboarding),
- default = true,
- )
+ var shouldShowMarketingOnboarding = false
+// appContext.getPreferenceKey(R.string.pref_key_should_show_marketing_onboarding),
+// default = true,
+// )
+ default = false,
)
val feltPrivateBrowsingEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_should_enable_felt_privacy),
diff --git a/mobile/android/fenix/app/src/main/res/xml/preferences.xml b/mobile/android/fenix/app/src/main/res/xml/preferences.xml
index 4c6b14bf87..9fc35fc6a8 100644
--- a/mobile/android/fenix/app/src/main/res/xml/preferences.xml

View File

@@ -12,7 +12,7 @@
<!-- Disk cache -->
<string name="preference_cache_enabled">Enable disk cache</string>
<string name="preference_cache_ssl_enabled">Enable disk cache for secure webpages (HTTPS)</string>
<string name="preference_cache_ssl_enabled">Enable disk cache for secure webpages</string>
<!-- EME -->
<string name="preferences_debug_settings_eme_enabled">Enable Encrypted Media Extensions (EME)</string>

View File

@@ -19,7 +19,7 @@ index 1f4d51c643..a2507eb8d1 100644
lazy,
"COLLECTION_ID",
diff --git a/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs b/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs
index 165309d17b..b196258d06 100644
index 165309d17b..689326135e 100644
--- a/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs
+++ b/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs
@@ -32,7 +32,7 @@ ChromeUtils.defineLazyGetter(lazy, "log", () => {
@@ -31,112 +31,21 @@ index 165309d17b..b196258d06 100644
export const UnenrollmentCause = {
fromCheckRecipeResult(result) {
@@ -146,57 +146,57 @@ export class ExperimentManager {
@@ -146,7 +146,7 @@ export class ExperimentManager {
return new Date();
},
};
- Object.defineProperty(context, "activeExperiments", {
- enumerable: true,
- get: async () => {
- await this.store.ready();
- return this.store.getAllActiveExperiments().map(exp => exp.slug);
- },
+/* Object.defineProperty(context, "activeExperiments", {
enumerable: true,
get: async () => {
await this.store.ready();
@@ -196,7 +196,7 @@ export class ExperimentManager {
return acc;
}, {});
},
- });
- Object.defineProperty(context, "activeRollouts", {
- enumerable: true,
- get: async () => {
- await this.store.ready();
- return this.store.getAllActiveRollouts().map(rollout => rollout.slug);
- },
- });
- Object.defineProperty(context, "previousExperiments", {
- enumerable: true,
- get: async () => {
- await this.store.ready();
- return this.store
- .getAll()
- .filter(enrollment => !enrollment.active && !enrollment.isRollout)
- .map(exp => exp.slug);
- },
- });
- Object.defineProperty(context, "previousRollouts", {
- enumerable: true,
- get: async () => {
- await this.store.ready();
- return this.store
- .getAll()
- .filter(enrollment => !enrollment.active && enrollment.isRollout)
- .map(rollout => rollout.slug);
- },
- });
- Object.defineProperty(context, "enrollments", {
- enumerable: true,
- get: async () => {
- await this.store.ready();
- return this.store.getAll().map(enrollment => enrollment.slug);
- },
- });
- Object.defineProperty(context, "enrollmentsMap", {
- enumerable: true,
- get: async () => {
- await this.store.ready();
- return this.store.getAll().reduce((acc, enrollment) => {
- acc[enrollment.slug] = enrollment.branch.slug;
- return acc;
- }, {});
- },
- });
+// Object.defineProperty(context, "activeExperiments", {
+// enumerable: true,
+// get: async () => {
+// await this.store.ready();
+// return this.store.getAllActiveExperiments().map(exp => exp.slug);
+// },
+// });
+// Object.defineProperty(context, "activeRollouts", {
+// enumerable: true,
+// get: async () => {
+// await this.store.ready();
+// return this.store.getAllActiveRollouts().map(rollout => rollout.slug);
+// },
+// });
+// Object.defineProperty(context, "previousExperiments", {
+// enumerable: true,
+// get: async () => {
+// await this.store.ready();
+// return this.store
+// .getAll()
+// .filter(enrollment => !enrollment.active && !enrollment.isRollout)
+// .map(exp => exp.slug);
+// },
+// });
+// Object.defineProperty(context, "previousRollouts", {
+// enumerable: true,
+// get: async () => {
+// await this.store.ready();
+// return this.store
+// .getAll()
+// .filter(enrollment => !enrollment.active && enrollment.isRollout)
+// .map(rollout => rollout.slug);
+// },
+// });
+// Object.defineProperty(context, "enrollments", {
+// enumerable: true,
+// get: async () => {
+// await this.store.ready();
+// return this.store.getAll().map(enrollment => enrollment.slug);
+// },
+// });
+// Object.defineProperty(context, "enrollmentsMap", {
+// enumerable: true,
+// get: async () => {
+// await this.store.ready();
+// return this.store.getAll().reduce((acc, enrollment) => {
+// acc[enrollment.slug] = enrollment.branch.slug;
+// return acc;
+// }, {});
+// },
+// });
+ });*/
return context;
}

View File

@@ -25,90 +25,60 @@ index 48b312d257..92b3b71f71 100644
} else {
TopSitesFrecencyConfig(
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 9197b274db..16ef08e767 100644
index 9197b274db..f101f8fd08 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
@@ -176,10 +176,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates whether or not top sites should be shown on the home screen.
*/
- var showTopSitesFeature by lazyFeatureFlagPreference(
+ var showTopSitesFeature by booleanPreference(
@@ -179,7 +179,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showTopSitesFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_show_top_sites),
- featureFlag = true,
featureFlag = true,
- default = { homescreenSections[HomeScreenSection.TOP_SITES] == true },
+// featureFlag = true,
+ default = true,
+ default = { true },
)
var numberOfAppLaunches by intPreference(
@@ -363,10 +363,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = false,
)
@@ -365,7 +365,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
- var showCollectionsPlaceholderOnHome by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_show_collections_placeholder_home),
var showCollectionsPlaceholderOnHome by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_show_collections_placeholder_home),
- default = true,
- )
+ var showCollectionsPlaceholderOnHome = false
+// appContext.getPreferenceKey(R.string.pref_key_show_collections_placeholder_home),
+// default = true,
+// )
+ default = false,
)
val isCrashReportingEnabled: Boolean
get() = isCrashReportEnabledInBuild &&
@@ -1149,10 +1149,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = true,
)
@@ -1151,7 +1151,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
- var defaultTopSitesAdded by booleanPreference(
- appContext.getPreferenceKey(R.string.default_top_sites_added),
var defaultTopSitesAdded by booleanPreference(
appContext.getPreferenceKey(R.string.default_top_sites_added),
- default = false,
- )
+ var defaultTopSitesAdded = true
+// appContext.getPreferenceKey(R.string.default_top_sites_added),
+// default = false,
+// )
+ default = true,
)
var shouldShowSearchSuggestionsInPrivate by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_show_search_suggestions_in_private),
@@ -1660,10 +1660,10 @@ class Settings(private val appContext: Context) : PreferencesHolder {
get() =
FxNimbus.features.homescreen.value().sectionsEnabled
@@ -1662,7 +1662,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
- var historyMetadataUIFeature by lazyFeatureFlagPreference(
+ var historyMetadataUIFeature by booleanPreference(
var historyMetadataUIFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_history_metadata_feature),
- default = { homescreenSections[HomeScreenSection.RECENT_EXPLORATIONS] == true },
- featureFlag = true,
+ default = false,
+// featureFlag = true,
+ default = { false },
featureFlag = true,
)
/**
@@ -1687,19 +1687,19 @@ class Settings(private val appContext: Context) : PreferencesHolder {
/**
* Indicates if the recent tabs functionality should be visible.
*/
- var showRecentTabsFeature by lazyFeatureFlagPreference(
+ var showRecentTabsFeature by booleanPreference(
@@ -1690,7 +1690,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showRecentTabsFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_recent_tabs),
- featureFlag = true,
featureFlag = true,
- default = { homescreenSections[HomeScreenSection.JUMP_BACK_IN] == true },
+// featureFlag = true,
+ default = false,
+ default = { false },
)
/**
* Indicates if the recent saved bookmarks functionality should be visible.
@@ -1698,7 +1698,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
- var showBookmarksHomeFeature by lazyFeatureFlagPreference(
+ var showBookmarksHomeFeature by booleanPreference(
var showBookmarksHomeFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_customization_bookmarks),
- default = { homescreenSections[HomeScreenSection.BOOKMARKS] == true },
- featureFlag = true,
+ default = false,
+// featureFlag = true,
+ default = { false },
featureFlag = true,
)
var signedInFxaAccount by booleanPreference(

View File

@@ -1,14 +1,13 @@
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
index 43bea16286..2e44c3b296 100644
index 43bea16286..f31b83b648 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt
@@ -256,6 +256,36 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
@@ -256,6 +256,33 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
)
onPreferenceChangeListener = SharedPreferenceUpdater()
}
+
+ requirePreference<SwitchPreference>(R.string.pref_key_eme_enabled).apply {
+ isVisible = true
+ isChecked = context.settings().emeEnabled
+ onPreferenceChangeListener = object : SharedPreferenceUpdater() {
+ override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {
@@ -20,13 +19,11 @@ index 43bea16286..2e44c3b296 100644
+ }
+
+ requirePreference<SwitchPreference>(R.string.pref_key_enable_unifiedpush).apply {
+ isVisible = true
+ isChecked = context.settings().enableUnifiedPush
+ onPreferenceChangeListener = SharedPreferenceUpdater()
+ }
+
+ requirePreference<SwitchPreference>(R.string.pref_key_widevine_enabled).apply {
+ isVisible = true
+ isChecked = context.settings().widevineEnabled
+ onPreferenceChangeListener = object : SharedPreferenceUpdater() {
+ override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {

View File

@@ -114,28 +114,6 @@ index 1443661bb8..218f4f1518 100644
val isDesktopMode by store.observeAsState(initialValue = false) { state ->
state.isDesktopMode
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/compose/MainMenu.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/compose/MainMenu.kt
index 3221dddb98..f611287899 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/compose/MainMenu.kt
+++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/compose/MainMenu.kt
@@ -470,7 +470,7 @@ private fun MenuDialogPreview() {
isDesktopMode = false,
isPdf = false,
isTranslationSupported = true,
- isWebCompatReporterSupported = true,
+ isWebCompatReporterSupported = false,
showQuitMenu = true,
isExtensionsProcessDisabled = true,
extensionsMenuItemDescription = "No extensions enabled",
@@ -516,7 +516,7 @@ private fun MenuDialogPrivatePreview() {
isDesktopMode = false,
isPdf = false,
isTranslationSupported = true,
- isWebCompatReporterSupported = true,
+ isWebCompatReporterSupported = false,
showQuitMenu = true,
isExtensionsProcessDisabled = false,
extensionsMenuItemDescription = "No extensions enabled",
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt
index e7e19273f9..2e6139bd25 100644
--- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt