Pier Angelo Vendrame pushed to branch tor-browser-146.0a1-16.0-1 at The Tor
Project / Applications / Tor Browser
Commits:
ec44cc24 by clairehurst at 2025-12-08T08:52:23+01:00
fixup! [android] Modify add-on support
- - - - -
2 changed files:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
-
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
Changes:
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
=====================================
@@ -112,6 +112,7 @@ import org.mozilla.fenix.session.VisibilityLifecycleCallback
import org.mozilla.fenix.settings.doh.DefaultDohSettingsProvider
import org.mozilla.fenix.settings.doh.DohSettingsProvider
import org.mozilla.fenix.startupCrash.StartupCrashActivity
+import org.mozilla.fenix.tor.RunOnceBootstrapped
import org.mozilla.fenix.utils.Settings
import org.mozilla.fenix.utils.isLargeScreenSize
import org.mozilla.fenix.wallpapers.Wallpaper
@@ -700,8 +701,13 @@ open class FenixApplication : LocaleAwareApplication(),
Provider {
components.useCases.tabsUseCases.selectTab(sessionId)
},
onExtensionsLoaded = { extensions ->
-
components.addonUpdater.registerForFutureUpdates(extensions)
-
subscribeForNewAddonsIfNeeded(components.supportedAddonsChecker, extensions)
+ // Delay until bootstrap is finished so that it will
actually update tor-browser#44303
+
components.torController.registerRunOnceBootstrapped(object :
RunOnceBootstrapped {
+ override fun onBootstrapped() {
+
components.addonUpdater.registerForFutureUpdates(extensions)
+
subscribeForNewAddonsIfNeeded(components.supportedAddonsChecker, extensions)
+ }
+ })
// Bug 1948634 - Make sure the webcompat-reporter
extension is fully uninstalled.
// This is added here because we need gecko to load the
extension first.
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
=====================================
@@ -18,9 +18,7 @@ import
mozilla.components.concept.engine.webextension.WebExtension
import mozilla.components.concept.engine.webextension.WebExtensionRuntime
import mozilla.components.support.webextensions.WebExtensionSupport
import mozilla.components.support.base.log.logger.Logger
-import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings
-import org.mozilla.fenix.tor.RunOnceBootstrapped
object TorBrowserFeatures {
private val logger = Logger("torbrowser-features")
@@ -133,26 +131,5 @@ object TorBrowserFeatures {
}
)
}
-
- /**
- * Enable automatic updates for NoScript and, if we've not done it
yet, force a
- * one-time immediate update check, in order to upgrade old profiles
and ensure we've got
- * the latest stable AMO version available on first startup.
- * We will do it as soon as the Tor is connected, to prevent early
addonUpdater activation
- * causing automatic update checks failures (components.addonUpdater
being a lazy prop).
- * The extension, from then on, should behave as if the user had
installed it manually.
- */
- context.components.torController.registerRunOnceBootstrapped(object :
RunOnceBootstrapped {
- override fun onBootstrapped() {
- // Enable automatic updates. This must be done on every
startup (tor-browser#42353)
-
context.components.addonUpdater.registerForFutureUpdates(NOSCRIPT_ID)
- // Force an immediate update check for older installations
- // and as belt-and-suspenders if scheduled updates fail
(tor-browser#44293)
- context.components.addonUpdater.update(NOSCRIPT_ID)
- settings.noscriptUpdated = 2
- }
- })
}
-
-
}
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ec44cc24c9575e79d0fc5dfcbae0dc38aa35513e
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ec44cc24c9575e79d0fc5dfcbae0dc38aa35513e
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tor-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]