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
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:
| ... | ... | @@ -112,6 +112,7 @@ import org.mozilla.fenix.session.VisibilityLifecycleCallback |
| 112 | 112 | import org.mozilla.fenix.settings.doh.DefaultDohSettingsProvider
|
| 113 | 113 | import org.mozilla.fenix.settings.doh.DohSettingsProvider
|
| 114 | 114 | import org.mozilla.fenix.startupCrash.StartupCrashActivity
|
| 115 | +import org.mozilla.fenix.tor.RunOnceBootstrapped
|
|
| 115 | 116 | import org.mozilla.fenix.utils.Settings
|
| 116 | 117 | import org.mozilla.fenix.utils.isLargeScreenSize
|
| 117 | 118 | import org.mozilla.fenix.wallpapers.Wallpaper
|
| ... | ... | @@ -700,8 +701,13 @@ open class FenixApplication : LocaleAwareApplication(), Provider { |
| 700 | 701 | components.useCases.tabsUseCases.selectTab(sessionId)
|
| 701 | 702 | },
|
| 702 | 703 | onExtensionsLoaded = { extensions ->
|
| 703 | - components.addonUpdater.registerForFutureUpdates(extensions)
|
|
| 704 | - subscribeForNewAddonsIfNeeded(components.supportedAddonsChecker, extensions)
|
|
| 704 | + // Delay until bootstrap is finished so that it will actually update tor-browser#44303
|
|
| 705 | + components.torController.registerRunOnceBootstrapped(object : RunOnceBootstrapped {
|
|
| 706 | + override fun onBootstrapped() {
|
|
| 707 | + components.addonUpdater.registerForFutureUpdates(extensions)
|
|
| 708 | + subscribeForNewAddonsIfNeeded(components.supportedAddonsChecker, extensions)
|
|
| 709 | + }
|
|
| 710 | + })
|
|
| 705 | 711 | |
| 706 | 712 | // Bug 1948634 - Make sure the webcompat-reporter extension is fully uninstalled.
|
| 707 | 713 | // This is added here because we need gecko to load the extension first.
|
| ... | ... | @@ -18,9 +18,7 @@ import mozilla.components.concept.engine.webextension.WebExtension |
| 18 | 18 | import mozilla.components.concept.engine.webextension.WebExtensionRuntime
|
| 19 | 19 | import mozilla.components.support.webextensions.WebExtensionSupport
|
| 20 | 20 | import mozilla.components.support.base.log.logger.Logger
|
| 21 | -import org.mozilla.fenix.ext.components
|
|
| 22 | 21 | import org.mozilla.fenix.ext.settings
|
| 23 | -import org.mozilla.fenix.tor.RunOnceBootstrapped
|
|
| 24 | 22 | |
| 25 | 23 | object TorBrowserFeatures {
|
| 26 | 24 | private val logger = Logger("torbrowser-features")
|
| ... | ... | @@ -133,26 +131,5 @@ object TorBrowserFeatures { |
| 133 | 131 | }
|
| 134 | 132 | )
|
| 135 | 133 | }
|
| 136 | - |
|
| 137 | - /**
|
|
| 138 | - * Enable automatic updates for NoScript and, if we've not done it yet, force a
|
|
| 139 | - * one-time immediate update check, in order to upgrade old profiles and ensure we've got
|
|
| 140 | - * the latest stable AMO version available on first startup.
|
|
| 141 | - * We will do it as soon as the Tor is connected, to prevent early addonUpdater activation
|
|
| 142 | - * causing automatic update checks failures (components.addonUpdater being a lazy prop).
|
|
| 143 | - * The extension, from then on, should behave as if the user had installed it manually.
|
|
| 144 | - */
|
|
| 145 | - context.components.torController.registerRunOnceBootstrapped(object : RunOnceBootstrapped {
|
|
| 146 | - override fun onBootstrapped() {
|
|
| 147 | - // Enable automatic updates. This must be done on every startup (tor-browser#42353)
|
|
| 148 | - context.components.addonUpdater.registerForFutureUpdates(NOSCRIPT_ID)
|
|
| 149 | - // Force an immediate update check for older installations
|
|
| 150 | - // and as belt-and-suspenders if scheduled updates fail (tor-browser#44293)
|
|
| 151 | - context.components.addonUpdater.update(NOSCRIPT_ID)
|
|
| 152 | - settings.noscriptUpdated = 2
|
|
| 153 | - }
|
|
| 154 | - })
|
|
| 155 | 134 | }
|
| 156 | - |
|
| 157 | - |
|
| 158 | 135 | } |