Bug 1859391 - Update cookie banner settings page to only support private mode.

fenix/121.0
Arturo Mejia 7 months ago committed by mergify[bot]
parent 2cf47b754e
commit 4c9f7f77a6

@ -8389,27 +8389,10 @@ autoplay:
- SitePermissions
cookie_banners:
visited_setting:
type: event
description: A user visited the cookie banner handling screen
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1796146
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/27561
- https://github.com/mozilla-mobile/firefox-android/pull/2597
- https://github.com/mozilla-mobile/firefox-android/pull/4039
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Privacy&Security
setting_changed:
setting_changed_pmb:
type: event
description: |
A user changed their setting.
A user changed their setting in private mode.
extra_keys:
cookie_banner_setting:
description: |
@ -8485,80 +8468,6 @@ cookie_banners:
metadata:
tags:
- Privacy&Security
visited_re_engagement_dialog:
type: event
description: An user visited the cookie banner re-engagement dialog
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
- https://github.com/mozilla-mobile/firefox-android/pull/2597
- https://github.com/mozilla-mobile/firefox-android/pull/4039
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Privacy&Security
opt_out_re_engagement_dialog:
type: event
description: |
An user opt out the cookie banner re-engagement
dialog by clicking the X button
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
- https://github.com/mozilla-mobile/firefox-android/pull/2597
- https://github.com/mozilla-mobile/firefox-android/pull/4039
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Privacy&Security
not_now_re_engagement_dialog:
type: event
description: |
An user clicked the not now button on
the cookie banner re-engagement dialog
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
- https://github.com/mozilla-mobile/firefox-android/pull/2597
- https://github.com/mozilla-mobile/firefox-android/pull/4039
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Privacy&Security
allow_re_engagement_dialog:
type: event
description: |
An user clicked the dismiss banner button
on the cookie banner re-engagement dialog
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
- https://github.com/mozilla-mobile/firefox-android/pull/2597
- https://github.com/mozilla-mobile/firefox-android/pull/4039
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Privacy&Security
report_site_domain:
type: url
description: |

@ -1,72 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.ui
import androidx.core.net.toUri
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.customannotations.SmokeTest
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.helpers.TestHelper.restartApp
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.homeScreen
class CookieBannerReductionTest {
@get:Rule
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1980504
// Bug causing flakiness https://bugzilla.mozilla.org/show_bug.cgi?id=1807440
@Ignore("Disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1852803")
@SmokeTest
@Test
fun verifyCookieBannerReductionFunctionalityTest() {
val webSite = "startsiden.no"
homeScreen {
}.openNavigationToolbar {
}.enterURLAndEnterToBrowser(webSite.toUri()) {
waitForPageToLoad()
verifyCookieBannerExists(exists = true)
}.openThreeDotMenu {
}.openSettings {
verifySettingsOptionSummary("Cookie banner reduction", "Off")
}.openCookieBannerReductionSubMenu {
verifyCookieBannerView(isCookieBannerReductionChecked = false)
clickCookieBannerReductionToggle()
verifyCheckedCookieBannerReductionToggle(isCookieBannerReductionChecked = true)
}.goBack {
verifySettingsOptionSummary("Cookie banner reduction", "On")
}
exitMenu()
browserScreen {
verifyCookieBannerExists(exists = false)
}
restartApp(activityTestRule)
browserScreen {
verifyCookieBannerExists(exists = false)
}.openThreeDotMenu {
}.openSettings {
}.openCookieBannerReductionSubMenu {
clickCookieBannerReductionToggle()
verifyCheckedCookieBannerReductionToggle(false)
}
exitMenu()
browserScreen {
waitForPageToLoad()
}.openThreeDotMenu {
}.refreshPage {
verifyCookieBannerExists(exists = false)
}
}
}

@ -55,8 +55,7 @@ class SettingsPrivacyTest {
verifyPrivateBrowsingButton()
verifyHTTPSOnlyModeButton()
verifySettingsOptionSummary("HTTPS-Only Mode", "Off")
verifyCookieBannerReductionButton()
verifySettingsOptionSummary("Cookie banner reduction", "Off")
verifySettingsOptionSummary("Cookie Banner Blocker in private browsing", "")
verifyEnhancedTrackingProtectionButton()
verifySettingsOptionSummary("Enhanced Tracking Protection", "Standard")
verifySitePermissionsButton()

@ -108,9 +108,6 @@ class SettingsRobot {
fun verifyPrivacyHeading() = assertPrivacyHeading()
fun verifyHTTPSOnlyModeButton() = assertHTTPSOnlyModeButton()
fun verifyCookieBannerReductionButton() =
onView(withText(R.string.preferences_cookie_banner_reduction)).check(matches(isDisplayed()))
fun verifyEnhancedTrackingProtectionButton() = assertEnhancedTrackingProtectionButton()
fun verifyLoginsAndPasswordsButton() = assertLoginsAndPasswordsButton()
fun verifyPrivateBrowsingButton() = assertPrivateBrowsingButton()
@ -323,14 +320,6 @@ class SettingsRobot {
return SettingsSubMenuSetDefaultBrowserRobot.Transition()
}
fun openCookieBannerReductionSubMenu(interact: SettingsSubMenuCookieBannerReductionRobot.() -> Unit): SettingsSubMenuCookieBannerReductionRobot.Transition {
scrollToElementByText(getStringResource(R.string.preferences_cookie_banner_reduction))
itemContainingText(getStringResource(R.string.preferences_cookie_banner_reduction)).click()
SettingsSubMenuCookieBannerReductionRobot().interact()
return SettingsSubMenuCookieBannerReductionRobot.Transition()
}
fun openEnhancedTrackingProtectionSubMenu(interact: SettingsSubMenuEnhancedTrackingProtectionRobot.() -> Unit): SettingsSubMenuEnhancedTrackingProtectionRobot.Transition {
scrollToElementByText("Enhanced Tracking Protection")
fun enhancedTrackingProtectionButton() =

@ -1,47 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.ui.robots
import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
import org.mozilla.fenix.helpers.MatcherHelper.assertCheckedItemWithResIdExists
import org.mozilla.fenix.helpers.MatcherHelper.assertItemContainingTextExists
import org.mozilla.fenix.helpers.MatcherHelper.checkedItemWithResId
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
import org.mozilla.fenix.helpers.TestHelper.mDevice
import org.mozilla.fenix.helpers.TestHelper.packageName
import org.mozilla.fenix.helpers.click
/**
* Implementation of Robot Pattern for the settings Cookie Banner Reduction sub menu.
*/
class SettingsSubMenuCookieBannerReductionRobot {
fun verifyCookieBannerView(isCookieBannerReductionChecked: Boolean) {
assertItemContainingTextExists(cookieBannerOptionTitle, cookieBannerOptionDescription)
assertCheckedItemWithResIdExists(checkedCookieBannerOptionToggle(isCookieBannerReductionChecked))
}
fun clickCookieBannerReductionToggle() = cookieBannerOptionToggle.click()
fun verifyCheckedCookieBannerReductionToggle(isCookieBannerReductionChecked: Boolean) =
assertCheckedItemWithResIdExists(checkedCookieBannerOptionToggle(isCookieBannerReductionChecked))
class Transition {
fun goBack(interact: SettingsRobot.() -> Unit): SettingsRobot.Transition {
mDevice.pressBack()
SettingsRobot().interact()
return SettingsRobot.Transition()
}
}
}
private val cookieBannerOptionTitle =
itemContainingText(getStringResource(R.string.reduce_cookie_banner_option))
private val cookieBannerOptionDescription =
itemContainingText(getStringResource(R.string.reduce_cookie_banner_summary_1))
private val cookieBannerOptionToggle =
itemWithResId("$packageName:id/learn_more_switch")
private fun checkedCookieBannerOptionToggle(isChecked: Boolean = false) =
checkedItemWithResId("$packageName:id/learn_more_switch", isChecked)

@ -26,7 +26,6 @@ enum class BrowserDirection(@IdRes val fragmentId: Int) {
FromAbout(R.id.aboutFragment),
FromTrackingProtection(R.id.trackingProtectionFragment),
FromHttpsOnlyMode(R.id.httpsOnlyFragment),
FromCookieBanner(R.id.cookieBannerFragment),
FromTrackingProtectionDialog(R.id.trackingProtectionPanelDialogFragment),
FromSavedLoginsFragment(R.id.savedLoginsFragment),
FromAddNewDeviceFragment(R.id.addNewDeviceFragment),

@ -140,7 +140,6 @@ import org.mozilla.fenix.perf.StartupTimeline
import org.mozilla.fenix.perf.StartupTypeTelemetry
import org.mozilla.fenix.search.SearchDialogFragmentDirections
import org.mozilla.fenix.session.PrivateNotificationService
import org.mozilla.fenix.settings.CookieBannersFragmentDirections
import org.mozilla.fenix.settings.HttpsOnlyFragmentDirections
import org.mozilla.fenix.settings.SettingsFragmentDirections
import org.mozilla.fenix.settings.TrackingProtectionFragmentDirections
@ -1022,8 +1021,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
HistoryMetadataGroupFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromTrackingProtectionExceptions ->
TrackingProtectionExceptionsFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromCookieBanner ->
CookieBannersFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromHttpsOnlyMode ->
HttpsOnlyFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromAbout ->

@ -1,62 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings
import android.os.Bundle
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreferenceCompat
import mozilla.components.concept.engine.Settings
import org.mozilla.fenix.GleanMetrics.CookieBanners
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.showToolbar
/**
* Lets the user set up the cookie banners handling preferences.
*/
class CookieBannersFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.cookie_banner_preferences, rootKey)
setupPreferences()
}
override fun onResume() {
super.onResume()
showToolbar(getString(R.string.preferences_cookie_banner_reduction))
}
private fun getEngineSettings(): Settings {
return requireContext().components.core.engine.settings
}
private fun setupPreferences() {
requirePreference<SwitchPreferenceCompat>(R.string.pref_key_cookie_banner_v1).apply {
summary =
getString(R.string.reduce_cookie_banner_summary_1, getString(R.string.app_name))
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(
preference: Preference,
newValue: Any?,
): Boolean {
val metricTag = if (newValue == true) {
"reject_all"
} else {
"disabled"
}
requireContext().settings().shouldUseCookieBanner = newValue as Boolean
val mode = requireContext().settings().getCookieBannerHandling()
getEngineSettings().cookieBannerHandlingModePrivateBrowsing = mode
getEngineSettings().cookieBannerHandlingMode = mode
CookieBanners.settingChanged.record(CookieBanners.SettingChangedExtra(metricTag))
requireContext().components.useCases.sessionUseCases.reload()
return super.onPreferenceChange(preference, newValue)
}
}
}
}
}

@ -1,26 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings
import android.content.Context
import android.util.AttributeSet
import org.mozilla.fenix.ext.settings
/**
* Cookie banners switch preference with a learn more link.
*/
class CookieBannersSwitchPreference(context: Context, attrs: AttributeSet?) :
LearnMoreSwitchPreference(context, attrs) {
override fun getLearnMoreUrl(): String {
return SupportUtils.getGenericSumoURLForTopic(
SupportUtils.SumoTopic.COOKIE_BANNER,
)
}
override fun getSwitchValue(): Boolean {
return context.settings().shouldUseCookieBanner
}
}

@ -1,83 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix.settings
import android.content.Context
import android.util.AttributeSet
import android.widget.TextView
import androidx.appcompat.widget.SwitchCompat
import androidx.core.view.isVisible
import androidx.preference.PreferenceViewHolder
import androidx.preference.SwitchPreferenceCompat
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.asActivity
/**
* A [SwitchPreferenceCompat] that include a learn more link.
*/
abstract class LearnMoreSwitchPreference(context: Context, attrs: AttributeSet?) :
SwitchPreferenceCompat(context, attrs) {
init {
layoutResource = R.layout.preference_switch_learn_more
}
override fun onBindViewHolder(holder: PreferenceViewHolder) {
super.onBindViewHolder(holder)
holder.itemView.isClickable = false
val switch = holder.findViewById(R.id.learn_more_switch) as SwitchCompat
switch.run {
isChecked = getSwitchValue()
setOnCheckedChangeListener { _, isChecked ->
onPreferenceChangeListener?.onPreferenceChange(
this@LearnMoreSwitchPreference,
isChecked,
)
}
}
getDescription()?.let {
val summaryView = holder.findViewById(android.R.id.summary) as TextView
summaryView.text = it
summaryView.isVisible = true
}
val learnMoreLink = holder.findViewById(R.id.link) as TextView
learnMoreLink.paint?.isUnderlineText = true
learnMoreLink.setOnClickListener {
it.context.asActivity()?.let { activity ->
(activity as HomeActivity).openToBrowserAndLoad(
searchTermOrURL = getLearnMoreUrl(),
newTab = true,
from = BrowserDirection.FromCookieBanner,
)
}
}
val backgroundDrawableArray =
context.obtainStyledAttributes(intArrayOf(R.attr.selectableItemBackground))
val backgroundDrawable = backgroundDrawableArray.getDrawable(0)
backgroundDrawableArray.recycle()
learnMoreLink.background = backgroundDrawable
}
/**
* Returns the description to be used the UI.
*/
open fun getDescription(): String? = null
/**
* Returns the URL that should be used when the learn more link is clicked.
*/
abstract fun getLearnMoreUrl(): String
/**
* Indicates the value which the switch widget should show.
*/
abstract fun getSwitchValue(): Boolean
}

@ -284,11 +284,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
resources.getString(R.string.pref_key_https_only_settings) -> {
SettingsFragmentDirections.actionSettingsFragmentToHttpsOnlyFragment()
}
resources.getString(R.string.pref_key_cookie_banner_settings) -> {
FxNimbus.features.cookieBanners.recordExposure()
CookieBanners.visitedSetting.record(mozilla.components.service.glean.private.NoExtras())
SettingsFragmentDirections.actionSettingsFragmentToCookieBannerFragment()
}
resources.getString(R.string.pref_key_accessibility) -> {
SettingsFragmentDirections.actionSettingsFragmentToAccessibilityFragment()
}
@ -675,13 +670,30 @@ class SettingsFragment : PreferenceFragmentCompat() {
@VisibleForTesting
internal fun setupCookieBannerPreference() {
with(requirePreference<Preference>(R.string.pref_key_cookie_banner_settings)) {
FxNimbus.features.cookieBanners.recordExposure()
if (context?.settings()?.shouldShowCookieBannerUI == false) return
with(requirePreference<SwitchPreference>(R.string.pref_key_cookie_banner_private_mode)) {
isVisible = context.settings().shouldShowCookieBannerUI
summary = if (context.settings().shouldUseCookieBanner) {
getString(R.string.reduce_cookie_banner_option_on)
} else {
getString(R.string.reduce_cookie_banner_option_off)
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(
preference: Preference,
newValue: Any?,
): Boolean {
val metricTag = if (newValue == true) {
"reject_all"
} else {
"disabled"
}
val engineSettings = requireContext().components.core.engine.settings
val settings = requireContext().settings()
settings.shouldUseCookieBannerPrivateMode = newValue as Boolean
val mode = settings.getCookieBannerHandlingPrivateMode()
engineSettings.cookieBannerHandlingModePrivateBrowsing = mode
CookieBanners.settingChangedPmb.record(CookieBanners.SettingChangedPmbExtra(metricTag))
requireContext().components.useCases.sessionUseCases.reload()
return super.onPreferenceChange(preference, newValue)
}
}
}
}

@ -55,7 +55,6 @@ object SupportUtils {
SMARTBLOCK("smartblock-enhanced-tracking-protection"),
SPONSOR_PRIVACY("sponsor-privacy"),
HTTPS_ONLY_MODE("https-only-mode-firefox-android"),
COOKIE_BANNER("cookie-banner-reduction-firefox-android"),
UNSIGNED_ADDONS("unsigned-addons"),
REVIEW_QUALITY_CHECK("review_checker_mobile"),
FX_SUGGEST("search-suggestions-firefox"),

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:orientation="horizontal"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="16dp"
android:paddingBottom="16dp">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItem"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Send usage data" />
<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="10"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintStart_toStartOf="@android:id/title"
app:layout_constraintTop_toBottomOf="@android:id/title"
tools:text="Mozilla strives to collect only what we need to provide and improve %1$s for everyone." />
<TextView
android:id="@+id/link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingExtra="1sp"
android:paddingBottom="4dp"
android:text="@string/studies_learn_more"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintStart_toStartOf="@android:id/title"
app:layout_constraintTop_toBottomOf="@android:id/summary" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/learn_more_switch"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:minWidth="58dp"
android:minHeight="48dp"
android:textColor="@color/state_list_text_color"
android:textOff="@string/studies_off"
android:textOn="@string/studies_on" />
</LinearLayout>

@ -597,13 +597,6 @@
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
<action
android:id="@+id/action_settingsFragment_to_cookieBannerFragment"
app:destination="@id/cookieBannerFragment"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
<action
android:id="@+id/action_settingsFragment_to_trackingProtectionFragment"
app:destination="@id/trackingProtectionFragment"
@ -840,10 +833,6 @@
android:id="@+id/httpsOnlyFragment"
android:name="org.mozilla.fenix.settings.HttpsOnlyFragment"
android:label="@string/preferences_https_only_title" />
<fragment
android:id="@+id/cookieBannerFragment"
android:name="org.mozilla.fenix.settings.CookieBannersFragment"
android:label="@string/preferences_cookie_banner_reduction" />
<fragment
android:id="@+id/sponsoredStoriesSettings"
android:name="org.mozilla.fenix.settings.SponsoredStoriesSettingsFragment"

@ -161,7 +161,6 @@
<string name="pref_key_https_only_in_private_tabs" translatable="false">pref_key_https_only_in_private_tabs</string>
<!-- Cookie Banner Reduction Settings-->
<string name="pref_key_cookie_banner_settings" translatable="false">pref_key_cookie_banner_settings</string>
<string name="pref_key_cookie_banner_v1" translatable="false">pref_key_cookie_banner_v1</string>
<string name="pref_key_cookie_banner_private_mode" translatable="false">pref_key_cookie_banner_private_mode</string>

@ -441,15 +441,17 @@
<string name="preferences_https_only_title">HTTPS-Only Mode</string>
<!-- Preference for removing cookie/consent banners from sites automatically. See reduce_cookie_banner_summary for additional context. -->
<string name="preferences_cookie_banner_reduction">Cookie banner reduction</string>
<string name="preferences_cookie_banner_reduction" moz:RemovedIn="121" tools:ignore="UnusedResources">Cookie banner reduction</string>
<!-- Preference for removing cookie/consent banners from sites automatically in private mode. See reduce_cookie_banner_summary for additional context. -->
<string name="preferences_cookie_banner_reduction_private_mode">Cookie Banner Blocker in private browsing</string>
<!-- Preference for rejecting or removing as many cookie/consent banners as possible on sites. See reduce_cookie_banner_summary for additional context. -->
<string name="reduce_cookie_banner_option">Reduce cookie banners</string>
<string name="reduce_cookie_banner_option" moz:RemovedIn="121" tools:ignore="UnusedResources">Reduce cookie banners</string>
<!-- Summary of cookie banner handling preference if the setting disabled is set to off -->
<string name="reduce_cookie_banner_option_off">Off</string>
<string name="reduce_cookie_banner_option_off" moz:RemovedIn="121" tools:ignore="UnusedResources">Off</string>
<!-- Summary of cookie banner handling preference if the setting enabled is set to on -->
<string name="reduce_cookie_banner_option_on">On</string>
<string name="reduce_cookie_banner_option_on" moz:RemovedIn="121" tools:ignore="UnusedResources">On</string>
<!-- Summary for the preference for rejecting all cookies whenever possible. The first parameter is the application name -->
<string name="reduce_cookie_banner_summary_1">%1$s automatically tries to reject cookie requests on cookie banners.</string>
<string name="reduce_cookie_banner_summary_1" moz:RemovedIn="121" tools:ignore="UnusedResources">%1$s automatically tries to reject cookie requests on cookie banners.</string>
<!-- Text for indicating cookie banner handling is off this site, this is shown as part of the protections panel with the tracking protection toggle -->
<string name="reduce_cookie_banner_off_for_site">Off for this site</string>
<!-- Text for cancel button indicating that cookie banner reduction is not supported for the current site, this is shown as part of the cookie banner details view. -->

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<org.mozilla.fenix.settings.CookieBannersSwitchPreference
android:defaultValue="false"
android:key="@string/pref_key_cookie_banner_v1"
android:title="@string/reduce_cookie_banner_option" />
</androidx.preference.PreferenceScreen>

@ -102,11 +102,12 @@
app:iconSpaceReserved="false"
android:title="@string/preferences_https_only_title" />
<androidx.preference.Preference
android:key="@string/pref_key_cookie_banner_settings"
<androidx.preference.SwitchPreference
android:defaultValue="false"
android:key="@string/pref_key_cookie_banner_private_mode"
app:iconSpaceReserved="false"
android:title="@string/preferences_cookie_banner_reduction"
app:isPreferenceVisible="false" />
app:isPreferenceVisible="false"
android:title="@string/preferences_cookie_banner_reduction_private_mode" />
<androidx.preference.Preference
android:key="@string/pref_key_tracking_protection_settings"

Loading…
Cancel
Save