Verified Commit fadbafad authored by ma1's avatar ma1
Browse files

amend! Modify Add-on support

Modify add-on support

Bug 41160: One-time ultimate switch Tor Browser Android to HTTPS-Only.
Bug 41159: Remove HTTPS-Everywhere extension from Tor Browser Android.

Bug 41094: Enable HTTPS-Only Mode by default in Tor Browser Android.

Bug 40225: Bundled extensions don't get updated with Android Tor
           Browser updates.

Bug 40030: Install NoScript addon on startup.

Also 40070: Consider storing the list of recommended addons

This implements our own AddonsProvider, which loads the list of
available addons from assets instead of fetching it from an
endpoint.

Also, we hide the uninstall button for builtin addons.

Bug 40058: Hide option for disallowing addon in private mode
parent 20676d09
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -98,10 +98,14 @@ object TorBrowserFeatures {
    fun install(context: Context, runtime: WebExtensionRuntime) {
        val settings = context.settings()
        /**
         * Remove HTTPS Everywhere if we didn't yet, unless HTTPS-Only is disabled, which might
         * mean user opted out from the built-in mechanism and still relies on the extension.
         * Remove HTTPS Everywhere if we didn't yet.
         */
        if (!settings.httpsEverywhereRemoved && settings.shouldUseHttpsOnly) {
        if (!settings.httpsEverywhereRemoved) {
            /**
             * Ensure HTTPS-Only is enabled.
             */
            settings.shouldUseHttpsOnly = true
            settings.shouldUseHttpsOnlyInAllTabs = true
            uninstallHTTPSEverywhere(
                runtime,
                onSuccess = {