Verified Commit d8110083 authored by cypherpunks1's avatar cypherpunks1 Committed by Pier Angelo Vendrame
Browse files

fixup! [android] Disable features and functionality

Bug 43202: Do not fetch featured addons on Android
parent 80d7589b
Loading
Loading
Loading
Loading
+3 −1
Changes for mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/AddonManager.kt: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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
+1 −1
Changes for mobile/android/android-components/components/feature/addons/src/main/java/mozilla/components/feature/addons/ui/AddonsManagerAdapter.kt: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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