Pier Angelo Vendrame pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor 
Project / Applications / Tor Browser


Commits:
c06f972b by cypherpunks1 at 2024-10-14T14:16:47+00:00
fixup! [android] Disable features and functionality

Bug 43202: Do not fetch featured addons on Android

- - - - -


2 changed files:

- 
mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/AddonManager.kt
- 
mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/ui/AddonsManagerAdapter.kt


Changes:

=====================================
mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/AddonManager.kt
=====================================
@@ -78,7 +78,7 @@ class AddonManager(
      * the [addonsProvider] or querying web extension state from the engine / 
store.
      */
     @Throws(AddonManagerException::class)
-    @Suppress("TooGenericExceptionCaught")
+    @Suppress("TooGenericExceptionCaught", "UNUSED_PARAMETER")
     suspend fun getAddons(waitForPendingActions: Boolean = true, allowCache: 
Boolean = true): List<Addon> {
         try {
             // Make sure extension support is initialized, i.e. the state of 
all installed extensions is known.
@@ -92,6 +92,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>()
+            /* tor-browser#40502: Do not recommend addons on Tor Browser
             try {
                 val userLanguage = Locale.getDefault().language
                 val locales = listOf(userLanguage)
@@ -103,6 +104,7 @@ class AddonManager(
                 // 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


=====================================
mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/ui/AddonsManagerAdapter.kt
=====================================
@@ -410,7 +410,7 @@ class AddonsManagerAdapter(
         }
 
         // Add recommended section and addons if available
-        if (false) { // recommendedAddons.isNotEmpty() tor-browser#40502: Do 
not recommend addons on Tor Browser
+        if (recommendedAddons.isNotEmpty()) {
             
itemsWithSections.add(Section(R.string.mozac_feature_addons_recommended_section,
 true))
             val filteredRecommendedAddons = recommendedAddons.filter {
                 it.id !in excludedAddonIDs



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c06f972b66dba485d15d3e3cc13bd7a09b6b1f71

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/c06f972b66dba485d15d3e3cc13bd7a09b6b1f71
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tbb-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tbb-commits

Reply via email to