[tbb-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.0-1] Bug 42089: Remove ability to submit site support requests

Dan Ballard (@dan) git at gitlab.torproject.org
Thu Sep 21 16:15:25 UTC 2023



Dan Ballard pushed to branch firefox-android-115.2.1-13.0-1 at The Tor Project / Applications / firefox-android


Commits:
8456bbb8 by clairehurst at 2023-09-21T16:13:32+00:00
Bug 42089: Remove ability to submit site support requests

- - - - -


13 changed files:

- android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/cookiebanners/GeckoCookieBannersStorage.kt
- android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/cookiebanners/ReportSiteDomainsRepository.kt
- android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/cookiehandling/CookieBannersStorage.kt
- fenix/app/metrics.yaml
- fenix/app/pings.yaml
- fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/ProtectionsView.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannerDetailsController.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannerDetailsInteractor.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannerHandlingDetailsView.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannersStorageExt.kt
- fenix/app/src/main/java/org/mozilla/fenix/trackingprotection/ProtectionsStore.kt
- fenix/app/src/main/res/layout/component_cookie_banner_details_panel.xml


Changes:

=====================================
android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/cookiebanners/GeckoCookieBannersStorage.kt
=====================================
@@ -21,7 +21,7 @@ import org.mozilla.geckoview.StorageController
  */
 class GeckoCookieBannersStorage(
     runtime: GeckoRuntime,
-    private val reportSiteDomainsRepository: ReportSiteDomainsRepository,
+//    private val reportSiteDomainsRepository: ReportSiteDomainsRepository,
 ) : CookieBannersStorage {
 
     private val geckoStorage: StorageController = runtime.storageController
@@ -34,13 +34,13 @@ class GeckoCookieBannersStorage(
         setGeckoException(uri, DISABLED, privateBrowsing)
     }
 
-    override suspend fun isSiteDomainReported(siteDomain: String): Boolean {
-        return reportSiteDomainsRepository.isSiteDomainReported(siteDomain)
-    }
-
-    override suspend fun saveSiteDomain(siteDomain: String) {
-        reportSiteDomainsRepository.saveSiteDomain(siteDomain)
-    }
+//    override suspend fun isSiteDomainReported(siteDomain: String): Boolean {
+//        return reportSiteDomainsRepository.isSiteDomainReported(siteDomain)
+//    }
+//
+//    override suspend fun saveSiteDomain(siteDomain: String) {
+//        reportSiteDomainsRepository.saveSiteDomain(siteDomain)
+//    }
 
     override suspend fun addPersistentExceptionInPrivateMode(uri: String) {
         setPersistentPrivateGeckoException(uri, DISABLED)


=====================================
android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/cookiebanners/ReportSiteDomainsRepository.kt
=====================================
@@ -12,64 +12,64 @@ import androidx.datastore.preferences.core.stringPreferencesKey
 import kotlinx.coroutines.flow.catch
 import kotlinx.coroutines.flow.first
 import kotlinx.coroutines.flow.map
-import mozilla.components.browser.engine.gecko.cookiebanners.ReportSiteDomainsRepository.PreferencesKeys.REPORT_SITE_DOMAINS
+//import mozilla.components.browser.engine.gecko.cookiebanners.ReportSiteDomainsRepository.PreferencesKeys.REPORT_SITE_DOMAINS
 import mozilla.components.support.base.log.logger.Logger
 import java.io.IOException
 
 /**
  * A repository to save reported site domains with the datastore API.
  */
-class ReportSiteDomainsRepository(
-    private val dataStore: DataStore<Preferences>,
-) {
-
-    companion object {
-        const val SEPARATOR = "@<;>@"
-        const val REPORT_SITE_DOMAINS_REPOSITORY_NAME = "report_site_domains_preferences"
-        const val PREFERENCE_KEY_NAME = "report_site_domains"
-    }
-
-    private object PreferencesKeys {
-        val REPORT_SITE_DOMAINS = stringPreferencesKey(PREFERENCE_KEY_NAME)
-    }
-
-    /**
-     * Check if the given site's domain url is saved locally.
-     * @param siteDomain the [siteDomain] that will be checked.
-     */
-    suspend fun isSiteDomainReported(siteDomain: String): Boolean {
-        return dataStore.data
-            .catch { exception ->
-                if (exception is IOException) {
-                    Logger.error("Error reading preferences.", exception)
-                    emit(emptyPreferences())
-                } else {
-                    throw exception
-                }
-            }.map { preferences ->
-                val reportSiteDomainsString = preferences[REPORT_SITE_DOMAINS] ?: ""
-                val reportSiteDomainsList =
-                    reportSiteDomainsString.split(SEPARATOR).filter { it.isNotEmpty() }
-                reportSiteDomainsList.contains(siteDomain)
-            }.first()
-    }
-
-    /**
-     * Save the given site's domain url in datastore to keep it persistent locally.
-     * This method gets called after the site domain was reported with Nimbus.
-     * @param siteDomain the [siteDomain] that will be saved.
-     */
-    suspend fun saveSiteDomain(siteDomain: String) {
-        dataStore.edit { preferences ->
-            val siteDomainsPreferences = preferences[REPORT_SITE_DOMAINS] ?: ""
-            val siteDomainsList = siteDomainsPreferences.split(SEPARATOR).filter { it.isNotEmpty() }
-            if (siteDomainsList.contains(siteDomain)) {
-                return at edit
-            }
-            val domains = mutableListOf<String>()
-            domains.addAll(siteDomainsList)
-            domains.add(siteDomain)
-            preferences[REPORT_SITE_DOMAINS] = domains.joinToString(SEPARATOR)
-        }
-    }
-}
+//class ReportSiteDomainsRepository(
+//    private val dataStore: DataStore<Preferences>,
+//) {
+//
+//    companion object {
+//        const val SEPARATOR = "@<;>@"
+//        const val REPORT_SITE_DOMAINS_REPOSITORY_NAME = "report_site_domains_preferences"
+//        const val PREFERENCE_KEY_NAME = "report_site_domains"
+//    }
+//
+//    private object PreferencesKeys {
+//        val REPORT_SITE_DOMAINS = stringPreferencesKey(PREFERENCE_KEY_NAME)
+//    }
+//
+//    /**
+//     * Check if the given site's domain url is saved locally.
+//     * @param siteDomain the [siteDomain] that will be checked.
+//     */
+//    suspend fun isSiteDomainReported(siteDomain: String): Boolean {
+//        return dataStore.data
+//            .catch { exception ->
+//                if (exception is IOException) {
+//                    Logger.error("Error reading preferences.", exception)
+//                    emit(emptyPreferences())
+//                } else {
+//                    throw exception
+//                }
+//            }.map { preferences ->
+//                val reportSiteDomainsString = preferences[REPORT_SITE_DOMAINS] ?: ""
+//                val reportSiteDomainsList =
+//                    reportSiteDomainsString.split(SEPARATOR).filter { it.isNotEmpty() }
+//                reportSiteDomainsList.contains(siteDomain)
+//            }.first()
+//    }
+//
+//    /**
+//     * Save the given site's domain url in datastore to keep it persistent locally.
+//     * This method gets called after the site domain was reported with Nimbus.
+//     * @param siteDomain the [siteDomain] that will be saved.
+//     */
+//    suspend fun saveSiteDomain(siteDomain: String) {
+//        dataStore.edit { preferences ->
+//            val siteDomainsPreferences = preferences[REPORT_SITE_DOMAINS] ?: ""
+//            val siteDomainsList = siteDomainsPreferences.split(SEPARATOR).filter { it.isNotEmpty() }
+//            if (siteDomainsList.contains(siteDomain)) {
+//                return at edit
+//            }
+//            val domains = mutableListOf<String>()
+//            domains.addAll(siteDomainsList)
+//            domains.add(siteDomain)
+//            preferences[REPORT_SITE_DOMAINS] = domains.joinToString(SEPARATOR)
+//        }
+//    }
+//}


=====================================
android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/cookiehandling/CookieBannersStorage.kt
=====================================
@@ -24,14 +24,14 @@ interface CookieBannersStorage {
      * Check if the given site's domain url is saved locally.
      * @param siteDomain the [siteDomain] that will be checked.
      */
-    suspend fun isSiteDomainReported(siteDomain: String): Boolean
+//    suspend fun isSiteDomainReported(siteDomain: String): Boolean
 
     /**
      * Save the given site's domain url in datastore to keep it persistent locally.
      * This method gets called after the site domain was reported with Nimbus.
      * @param siteDomain the [siteDomain] that will be saved.
      */
-    suspend fun saveSiteDomain(siteDomain: String)
+//    suspend fun saveSiteDomain(siteDomain: String)
 
     /**
      * Set persistently the [CookieBannerHandlingMode.DISABLED] mode for the given [uri] in


=====================================
fenix/app/metrics.yaml
=====================================
@@ -7738,62 +7738,62 @@ cookie_banners:
     metadata:
       tags:
         - Privacy&Security
-  report_site_domain:
-    type: url
-    description: |
-      A user can report a site domain(Ex. for https://edition.cnn.com/
-      site domain will be cnn.com) when the cookie banner reducer is not
-      working from the cookie banner details panel.
-    lifetime: ping
-    send_in_pings:
-      - cookie-banner-report-site
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
-    data_sensitivity:
-      - technical
-      - interaction
-    notification_emails:
-      - android-probes at mozilla.com
-    expires: 119
-    metadata:
-      tags:
-        - Privacy&Security
-  report_site_cancel_button:
-    type: event
-    description: |
-      The user has pressed the report site domain cancel button
-      from the cookie banner reducer details panel.
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
-    data_sensitivity:
-      - interaction
-    notification_emails:
-      - android-probes at mozilla.com
-    expires: 119
-    metadata:
-      tags:
-        - Privacy&Security
-  report_domain_site_button:
-    type: event
-    description: |
-      The user has pressed the report site domain button
-      from the cookie banner reducer details panel.
-    bugs:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
-    data_reviews:
-      - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
-    data_sensitivity:
-      - interaction
-    notification_emails:
-      - android-probes at mozilla.com
-    expires: 119
-    metadata:
-      tags:
-        - Privacy&Security
+#  report_site_domain:
+#    type: url
+#    description: |
+#      A user can report a site domain(Ex. for https://edition.cnn.com/
+#      site domain will be cnn.com) when the cookie banner reducer is not
+#      working from the cookie banner details panel.
+#    lifetime: ping
+#    send_in_pings:
+#      - cookie-banner-report-site
+#    bugs:
+#      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
+#    data_reviews:
+#      - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
+#    data_sensitivity:
+#      - technical
+#      - interaction
+#    notification_emails:
+#      - android-probes at mozilla.com
+#    expires: 119
+#    metadata:
+#      tags:
+#        - Privacy&Security
+#  report_site_cancel_button:
+#    type: event
+#    description: |
+#      The user has pressed the report site domain cancel button
+#      from the cookie banner reducer details panel.
+#    bugs:
+#      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
+#    data_reviews:
+#      - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
+#    data_sensitivity:
+#      - interaction
+#    notification_emails:
+#      - android-probes at mozilla.com
+#    expires: 119
+#    metadata:
+#      tags:
+#        - Privacy&Security
+#  report_domain_site_button:
+#    type: event
+#    description: |
+#      The user has pressed the report site domain button
+#      from the cookie banner reducer details panel.
+#    bugs:
+#      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
+#    data_reviews:
+#      - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
+#    data_sensitivity:
+#      - interaction
+#    notification_emails:
+#      - android-probes at mozilla.com
+#    expires: 119
+#    metadata:
+#      tags:
+#        - Privacy&Security
 
 site_permissions:
   prompt_shown:


=====================================
fenix/app/pings.yaml
=====================================
@@ -65,15 +65,15 @@ spoc:
   notification_emails:
     - android-probes at mozilla.com
 
-cookie-banner-report-site:
-  description: |
-    This ping is needed when the cookie banner reducer doesn't work on
-    a website, and the user wants to report the site.
-    This ping doesn't include a client id.
-  include_client_id: false
-  bugs:
-    - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
-  data_reviews:
-    - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
-  notification_emails:
-    - android-probes at mozilla.com
+#cookie-banner-report-site:
+#  description: |
+#    This ping is needed when the cookie banner reducer doesn't work on
+#    a website, and the user wants to report the site.
+#    This ping doesn't include a client id.
+#  include_client_id: false
+#  bugs:
+#    - https://bugzilla.mozilla.org/show_bug.cgi?id=1805450
+#  data_reviews:
+#    - https://github.com/mozilla-mobile/firefox-android/pull/1298#pullrequestreview-1350344223
+#  notification_emails:
+#    - android-probes at mozilla.com


=====================================
fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
=====================================
@@ -16,7 +16,7 @@ import mozilla.components.browser.domains.autocomplete.BaseDomainAutocompletePro
 import mozilla.components.browser.domains.autocomplete.ShippedDomainsProvider
 import mozilla.components.browser.engine.gecko.GeckoEngine
 import mozilla.components.browser.engine.gecko.cookiebanners.GeckoCookieBannersStorage
-import mozilla.components.browser.engine.gecko.cookiebanners.ReportSiteDomainsRepository
+//import mozilla.components.browser.engine.gecko.cookiebanners.ReportSiteDomainsRepository
 import mozilla.components.browser.engine.gecko.fetch.GeckoViewFetchClient
 import mozilla.components.browser.engine.gecko.permission.GeckoSitePermissionsStorage
 import mozilla.components.browser.icons.BrowserIcons
@@ -197,14 +197,14 @@ class Core(
         )
     }
 
-    private val Context.dataStore by preferencesDataStore(
-        name = ReportSiteDomainsRepository.REPORT_SITE_DOMAINS_REPOSITORY_NAME,
-    )
+//    private val Context.dataStore by preferencesDataStore(
+//        name = ReportSiteDomainsRepository.REPORT_SITE_DOMAINS_REPOSITORY_NAME,
+//    )
 
     val cookieBannersStorage by lazyMonitored {
         GeckoCookieBannersStorage(
             geckoRuntime,
-            ReportSiteDomainsRepository(context.dataStore),
+//            ReportSiteDomainsRepository(context.dataStore),
         )
     }
 


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/ProtectionsView.kt
=====================================
@@ -94,7 +94,7 @@ class ProtectionsView(
         binding.cookieBannerItem.apply {
             setContent {
                 FirefoxTheme {
-                    if (cookieBannerMode == CookieBannerUIMode.REQUEST_UNSUPPORTED_SITE_SUBMITTED) {
+                    if (cookieBannerMode == CookieBannerUIMode.SITE_NOT_SUPPORTED) {
                         CookieBannerItem(
                             label = label,
                             cookieBannerUIMode = cookieBannerMode,


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannerDetailsController.kt
=====================================
@@ -55,7 +55,7 @@ interface CookieBannerDetailsController {
     /**
      * @see [CookieBannerDetailsInteractor.handleRequestSiteSupportPressed]
      */
-    fun handleRequestSiteSupportPressed()
+//    fun handleRequestSiteSupportPressed()
 }
 
 /**
@@ -144,37 +144,37 @@ class DefaultCookieBannerDetailsController(
         }
     }
 
-    override fun handleRequestSiteSupportPressed() {
-        val tab = requireNotNull(browserStore.state.findTabOrCustomTab(sessionId)) {
-            "A session is required to report site domain"
-        }
-        CookieBanners.reportDomainSiteButton.record(NoExtras())
-        ioScope.launch {
-            val siteDomain = getTabDomain(tab)
-            siteDomain?.let { domain ->
-                withContext(Dispatchers.Main) {
-                    protectionsStore.dispatch(ProtectionsAction.RequestReportSiteDomain(domain))
-                    CookieBanners.reportSiteDomain.set(domain)
-                    Pings.cookieBannerReportSite.submit()
-                    protectionsStore.dispatch(
-                        ProtectionsAction.UpdateCookieBannerMode(
-                            cookieBannerUIMode = CookieBannerUIMode.REQUEST_UNSUPPORTED_SITE_SUBMITTED,
-                        ),
-                    )
-                    fragment.activity?.getRootView()?.let { view ->
-                        showSnackBar(
-                            view,
-                            context.getString(R.string.cookie_banner_handling_report_site_snack_bar_text_2),
-                            FenixSnackbar.LENGTH_LONG,
-                        )
-                    }
-                    withContext(Dispatchers.IO) {
-                        cookieBannersStorage.saveSiteDomain(domain)
-                    }
-                }
-            }
-        }
-    }
+//    override fun handleRequestSiteSupportPressed() {
+//        val tab = requireNotNull(browserStore.state.findTabOrCustomTab(sessionId)) {
+//            "A session is required to report site domain"
+//        }
+//        CookieBanners.reportDomainSiteButton.record(NoExtras())
+//        ioScope.launch {
+//            val siteDomain = getTabDomain(tab)
+//            siteDomain?.let { domain ->
+//                withContext(Dispatchers.Main) {
+//                    protectionsStore.dispatch(ProtectionsAction.RequestReportSiteDomain(domain))
+//                    CookieBanners.reportSiteDomain.set(domain)
+//                    Pings.cookieBannerReportSite.submit()
+//                    protectionsStore.dispatch(
+//                        ProtectionsAction.UpdateCookieBannerMode(
+//                            cookieBannerUIMode = CookieBannerUIMode.REQUEST_UNSUPPORTED_SITE_SUBMITTED,
+//                        ),
+//                    )
+//                    fragment.activity?.getRootView()?.let { view ->
+//                        showSnackBar(
+//                            view,
+//                            context.getString(R.string.cookie_banner_handling_report_site_snack_bar_text_2),
+//                            FenixSnackbar.LENGTH_LONG,
+//                        )
+//                    }
+//                    withContext(Dispatchers.IO) {
+//                        cookieBannersStorage.saveSiteDomain(domain)
+//                    }
+//                }
+//            }
+//        }
+//    }
 
     @VisibleForTesting
     internal suspend fun clearSiteData(tab: SessionState) {


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannerDetailsInteractor.kt
=====================================
@@ -21,7 +21,7 @@ interface CookieBannerDetailsInteractor {
     /**
      * Called whenever the user press request support site domain.
      */
-    fun handleRequestSiteSupportPressed()
+//    fun handleRequestSiteSupportPressed()
 }
 
 /**
@@ -45,7 +45,7 @@ class DefaultCookieBannerDetailsInteractor(
         controller.handleTogglePressed(vale)
     }
 
-    override fun handleRequestSiteSupportPressed() {
-        controller.handleRequestSiteSupportPressed()
-    }
+//    override fun handleRequestSiteSupportPressed() {
+//        controller.handleRequestSiteSupportPressed()
+//    }
 }


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannerHandlingDetailsView.kt
=====================================
@@ -57,7 +57,7 @@ class CookieBannerHandlingDetailsView(
         when (state.cookieBannerUIMode) {
             CookieBannerUIMode.ENABLE -> setUiForExceptionMode(state)
             CookieBannerUIMode.DISABLE -> setUiForExceptionMode(state)
-            CookieBannerUIMode.SITE_NOT_SUPPORTED -> setUiForReportSiteMode()
+//            CookieBannerUIMode.SITE_NOT_SUPPORTED -> setUiForReportSiteMode()
             else -> {}
         }
     }
@@ -67,19 +67,19 @@ class CookieBannerHandlingDetailsView(
         bindSwitch(state.cookieBannerUIMode)
     }
 
-    private fun setUiForReportSiteMode() {
-        binding.cancelButton.visibility = View.VISIBLE
-        binding.requestSupport.visibility = View.VISIBLE
-        binding.cookieBannerSwitch.visibility = View.GONE
-        binding.requestSupport.setOnClickListener {
-            interactor.handleRequestSiteSupportPressed()
-            onDismiss.invoke()
-        }
-        binding.cancelButton.setOnClickListener {
-            CookieBanners.reportSiteCancelButton.record(NoExtras())
-            interactor.onBackPressed()
-        }
-    }
+//    private fun setUiForReportSiteMode() {
+//        binding.cancelButton.visibility = View.VISIBLE
+//        binding.requestSupport.visibility = View.VISIBLE
+//        binding.cookieBannerSwitch.visibility = View.GONE
+//        binding.requestSupport.setOnClickListener {
+//            interactor.handleRequestSiteSupportPressed()
+//            onDismiss.invoke()
+//        }
+//        binding.cancelButton.setOnClickListener {
+//            CookieBanners.reportSiteCancelButton.record(NoExtras())
+//            interactor.onBackPressed()
+//        }
+//    }
 
     @VisibleForTesting
     internal fun bindTitle(url: String, state: CookieBannerUIMode) {


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/CookieBannersStorageExt.kt
=====================================
@@ -24,15 +24,15 @@ suspend fun CookieBannersStorage.getCookieBannerUIMode(
     tab: SessionState,
 ): CookieBannerUIMode {
     return if (context.settings().shouldUseCookieBanner) {
-        val isSiteDomainReported = withContext(Dispatchers.IO) {
-            val host = tab.content.url.toUri().host.orEmpty()
-            val siteDomain = context.components.publicSuffixList.getPublicSuffixPlusOne(host).await()
-            siteDomain?.let { isSiteDomainReported(it) }
-        }
-
-        if (isSiteDomainReported == true) {
-            return CookieBannerUIMode.REQUEST_UNSUPPORTED_SITE_SUBMITTED
-        }
+//        val isSiteDomainReported = withContext(Dispatchers.IO) {
+//            val host = tab.content.url.toUri().host.orEmpty()
+//            val siteDomain = context.components.publicSuffixList.getPublicSuffixPlusOne(host).await()
+//            siteDomain?.let { isSiteDomainReported(it) }
+//        }
+//
+//        if (isSiteDomainReported == true) {
+//            return CookieBannerUIMode.REQUEST_UNSUPPORTED_SITE_SUBMITTED
+//        }
 
         val hasException = withContext(Dispatchers.IO) {
             hasException(tab.content.url, tab.content.private)


=====================================
fenix/app/src/main/java/org/mozilla/fenix/trackingprotection/ProtectionsStore.kt
=====================================
@@ -52,9 +52,9 @@ sealed class ProtectionsAction : Action {
      *
      * @param url to report.
      */
-    data class RequestReportSiteDomain(
-        val url: String,
-    ) : ProtectionsAction()
+//    data class RequestReportSiteDomain(
+//        val url: String,
+//    ) : ProtectionsAction()
 
     /**
      * Indicates that cookie banner handling mode has been updated.
@@ -167,10 +167,10 @@ enum class CookieBannerUIMode(
      * REQUEST_UNSUPPORTED_SITE_SUBMITTED - The user submitted a request
      * for adding support for cookie banner handling for the domain.
      */
-    REQUEST_UNSUPPORTED_SITE_SUBMITTED(
-        R.string.reduce_cookie_banner_unsupported_site_request_submitted_2,
-        R.drawable.ic_cookies_disabled,
-    ),
+//    REQUEST_UNSUPPORTED_SITE_SUBMITTED(
+//        R.string.reduce_cookie_banner_unsupported_site_request_submitted_2,
+//        R.drawable.ic_cookies_disabled,
+//    ),
 
     /**
      HIDE - All the cookie banner handling in the tracking panel is hidden.
@@ -243,9 +243,9 @@ fun protectionsStateReducer(
         is ProtectionsAction.ToggleCookieBannerHandlingProtectionEnabled -> state.copy(
             cookieBannerUIMode = action.cookieBannerUIMode,
         )
-        is ProtectionsAction.RequestReportSiteDomain -> state.copy(
-            url = action.url,
-        )
+//        is ProtectionsAction.RequestReportSiteDomain -> state.copy(
+//            url = action.url,
+//        )
         is ProtectionsAction.UpdateCookieBannerMode -> state.copy(
             cookieBannerUIMode = action.cookieBannerUIMode,
         )


=====================================
fenix/app/src/main/res/layout/component_cookie_banner_details_panel.xml
=====================================
@@ -64,40 +64,40 @@
         app:switchShowIcon="false"
         app:switchTitle="@string/preferences_cookie_banner_reduction" />
 
-    <androidx.appcompat.widget.AppCompatButton
-        android:id="@+id/cancel_button"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:visibility="gone"
-        android:layout_marginTop="16dp"
-        android:background="@android:color/transparent"
-        android:gravity="center"
-        android:minHeight="48dp"
-        android:text="@string/cookie_banner_handling_details_site_is_not_supported_cancel_button"
-        android:layout_marginEnd="16dp"
-        android:textAllCaps="true"
-        android:textColor="@color/fx_mobile_text_color_accent"
-        android:textSize="14sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/details" />
+<!--    <androidx.appcompat.widget.AppCompatButton-->
+<!--        android:id="@+id/cancel_button"-->
+<!--        android:layout_width="wrap_content"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:visibility="gone"-->
+<!--        android:layout_marginTop="16dp"-->
+<!--        android:background="@android:color/transparent"-->
+<!--        android:gravity="center"-->
+<!--        android:minHeight="48dp"-->
+<!--        android:text="@string/cookie_banner_handling_details_site_is_not_supported_cancel_button"-->
+<!--        android:layout_marginEnd="16dp"-->
+<!--        android:textAllCaps="true"-->
+<!--        android:textColor="@color/fx_mobile_text_color_accent"-->
+<!--        android:textSize="14sp"-->
+<!--        app:layout_constraintEnd_toEndOf="parent"-->
+<!--        app:layout_constraintStart_toStartOf="parent"-->
+<!--        app:layout_constraintTop_toBottomOf="@id/details" />-->
 
-    <androidx.appcompat.widget.AppCompatButton
-        android:id="@+id/request_support"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:visibility="gone"
-        android:layout_marginTop="16dp"
-        android:background="@android:color/transparent"
-        android:gravity="center"
-        android:minHeight="48dp"
-        android:layout_marginEnd="16dp"
-        android:text="@string/cookie_banner_handling_details_site_is_not_supported_request_support_button_2"
-        android:textAllCaps="true"
-        android:textColor="@color/fx_mobile_text_color_accent"
-        android:textSize="14sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintStart_toEndOf="@+id/cancel_button"
-        app:layout_constraintTop_toBottomOf="@id/details" />
+<!--    <androidx.appcompat.widget.AppCompatButton-->
+<!--        android:id="@+id/request_support"-->
+<!--        android:layout_width="wrap_content"-->
+<!--        android:layout_height="wrap_content"-->
+<!--        android:visibility="gone"-->
+<!--        android:layout_marginTop="16dp"-->
+<!--        android:background="@android:color/transparent"-->
+<!--        android:gravity="center"-->
+<!--        android:minHeight="48dp"-->
+<!--        android:layout_marginEnd="16dp"-->
+<!--        android:text="@string/cookie_banner_handling_details_site_is_not_supported_request_support_button_2"-->
+<!--        android:textAllCaps="true"-->
+<!--        android:textColor="@color/fx_mobile_text_color_accent"-->
+<!--        android:textSize="14sp"-->
+<!--        app:layout_constraintEnd_toEndOf="parent"-->
+<!--        app:layout_constraintLeft_toLeftOf="parent"-->
+<!--        app:layout_constraintStart_toEndOf="@+id/cancel_button"-->
+<!--        app:layout_constraintTop_toBottomOf="@id/details" />-->
 </androidx.constraintlayout.widget.ConstraintLayout>



View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/8456bbb8e5a01cca8822a01fd4049dd1b4320b53

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/8456bbb8e5a01cca8822a01fd4049dd1b4320b53
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230921/f71b0c33/attachment-0001.htm>


More information about the tbb-commits mailing list