Commit 58c90df6 authored by Matthew Finkel's avatar Matthew Finkel Committed by Pier Angelo Vendrame
Browse files

[android] Disable features and functionality

Bug 33594: Disable data collection by default (Glean)

Bug 34338: Disable the crash reporter

Bug 40014: Neuter Google Advertising ID

Bug 40018: Disable Push service

Bug 40034: Disable PWA onboading

Bug 40072: Disable Tracking Protection

Bug 40061: Do not show "Send to device" in sharing menu

Bug 40109: Reduce requested permissions

Exclude LOCATION and NETWORK_STATE
parent 9a20e764
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ class SettingsTest {
            cookieBannerHandlingDetectOnlyMode = true,
            cookieBannerHandlingGlobalRules = true,
            cookieBannerHandlingGlobalRulesSubFrames = true,
            emailTrackerBlockingPrivateBrowsing = true,
            emailTrackerBlockingPrivateBrowsing = false,
        )

        assertFalse(defaultSettings.domStorageEnabled)
+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
    androidResources {
        ignoreAssetsPattern '!<dir>extensions'
    }

    namespace = 'mozilla.components.feature.accounts'
}

+4 −1
Original line number Diff line number Diff line
@@ -83,7 +83,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,
@@ -113,6 +113,8 @@ 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)
@@ -124,6 +126,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
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ apply plugin: 'kotlin-android'

android {
    androidResources {
        ignoreAssetsPattern '!amazon*:!azerdict*:!baidu*:!bing*:!ceneje*:!coccoc*:!daum*:!ebay*:!ecosia*:!faclair*:!google*:!gulesider*:!leo*:!mapy*:!mercadolibre*:!odpiralni*:!pazaruvaj*:!prisjakt*:!qwant*:!rakuten*:!salidzinilv*:!seznam*:!vatera*:!wikipedia-*:!wiktionary*:!yahoo*:!yandex*'
        ignoreAssetsPattern '!<dir>extensions:!search_telemetry_v2.json:!amazon*:!azerdict*:!baidu*:!bing*:!ceneje*:!coccoc*:!daum*:!ebay*:!ecosia*:!faclair*:!google*:!gulesider*:!leo*:!mapy*:!mercadolibre*:!odpiralni*:!pazaruvaj*:!prisjakt*:!qwant*:!rakuten*:!salidzinilv*:!seznam*:!vatera*:!wikipedia-*:!wiktionary*:!yahoo*:!yandex*'
    }

    sourceSets {
+1 −4
Original line number Diff line number Diff line
@@ -80,10 +80,7 @@ class SearchMiddleware(
    )
    private val client: RemoteSettingsClient? =
        searchEngineSelectorConfig?.service?.remoteSettingsService?.makeClient(SEARCH_CONFIG_ICONS_COLLECTION_NAME)
    private val searchEngineSelectorRepository: SearchEngineRepository? =
        searchEngineSelectorConfig?.let {
                SearchEngineSelectorRepository(context, it, defaultSearchEngineIcon, client)
        }
    private val searchEngineSelectorRepository: SearchEngineRepository? = null // needs to always be null so that the regionBundle isn't populated with empty RemoteSettings and instead defaults to what we need

    override fun invoke(
        store: Store<BrowserState, BrowserAction>,
Loading