Commit e69b0494 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 c072dd9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ import mozilla.components.concept.engine.translate.TranslationSupport
 * See [TranslationsState.translationError] for session level errors.
 */
data class TranslationsBrowserState(
    val isTranslationsEnabled: Boolean = true,
    val isTranslationsEnabled: Boolean = false,
    val isEngineSupported: Boolean? = null,
    val offerTranslation: Boolean? = null,
    val supportedLanguages: TranslationSupport? = null,
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ interface AIFeatureBlock {
}

private class InMemoryAIFeatureBlock(initialBlocked: Boolean) : AIFeatureBlock {
    private val _isBlocked = MutableStateFlow(initialBlocked)
    private val _isBlocked = MutableStateFlow(true)
    override val isBlocked: Flow<Boolean> = _isBlocked

    override suspend fun block() {
@@ -40,6 +40,6 @@ private class InMemoryAIFeatureBlock(initialBlocked: Boolean) : AIFeatureBlock {
    }

    override suspend fun unblock() {
        _isBlocked.value = false
        _isBlocked.value = true
    }
}
+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
Loading