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
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:
| ... | ... | @@ -78,7 +78,7 @@ class AddonManager( | 
| 78 | 78 |       * the [addonsProvider] or querying web extension state from the engine / store.
 | 
| 79 | 79 |       */
 | 
| 80 | 80 |      @Throws(AddonManagerException::class)
 | 
| 81 | -    @Suppress("TooGenericExceptionCaught")
 | |
| 81 | +    @Suppress("TooGenericExceptionCaught", "UNUSED_PARAMETER")
 | |
| 82 | 82 |      suspend fun getAddons(waitForPendingActions: Boolean = true, allowCache: Boolean = true): List<Addon> {
 | 
| 83 | 83 |          try {
 | 
| 84 | 84 |              // Make sure extension support is initialized, i.e. the state of all installed extensions is known.
 | 
| ... | ... | @@ -92,6 +92,7 @@ class AddonManager( | 
| 92 | 92 |              // Get all the featured add-ons not installed from provider.
 | 
| 93 | 93 |              // NB: We're keeping translations only for the default locale.
 | 
| 94 | 94 |              var featuredAddons = emptyList<Addon>()
 | 
| 95 | +            /* tor-browser#40502: Do not recommend addons on Tor Browser
 | |
| 95 | 96 |              try {
 | 
| 96 | 97 |                  val userLanguage = Locale.getDefault().language
 | 
| 97 | 98 |                  val locales = listOf(userLanguage)
 | 
| ... | ... | @@ -103,6 +104,7 @@ class AddonManager( | 
| 103 | 104 |                  // Do not throw when we fail to fetch the featured add-ons since there can be installed add-ons.
 | 
| 104 | 105 |                  logger.warn("Failed to get the featured add-ons", throwable)
 | 
| 105 | 106 |              }
 | 
| 107 | +            */
 | |
| 106 | 108 | |
| 107 | 109 |              // Build a list of installed extensions that are not built-in extensions.
 | 
| 108 | 110 |              val installedAddons = installedExtensions
 | 
| ... | ... | @@ -410,7 +410,7 @@ class AddonsManagerAdapter( | 
| 410 | 410 |          }
 | 
| 411 | 411 | |
| 412 | 412 |          // Add recommended section and addons if available
 | 
| 413 | -        if (false) { // recommendedAddons.isNotEmpty() tor-browser#40502: Do not recommend addons on Tor Browser
 | |
| 413 | +        if (recommendedAddons.isNotEmpty()) {
 | |
| 414 | 414 |              itemsWithSections.add(Section(R.string.mozac_feature_addons_recommended_section, true))
 | 
| 415 | 415 |              val filteredRecommendedAddons = recommendedAddons.filter {
 | 
| 416 | 416 |                  it.id !in excludedAddonIDs
 |