ma1 pushed to branch firefox-android-115.2.1-13.0-1 at The Tor Project / Applications / firefox-android
Commits: cb98e7b2 by hackademix at 2024-01-08T19:54:56+01:00 fixup! Modify add-on support
Bug 42353: Fix NoScript automatic updates.
- - - - -
1 changed file:
- fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
Changes:
===================================== fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt ===================================== @@ -136,37 +136,37 @@ object TorBrowserFeatures { }
/** - * If we have not done it yet, enable automatic updates for NoScript and force a + * 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. */ - if (settings.noscriptUpdated == 0) { - context.components.torController.registerTorListener(object : TorEvents { - override fun onTorConnected() { - context.components.torController.unregisterTorListener(this) - // Enable automatic updates - context.components.addonUpdater.registerForFutureUpdates(NOSCRIPT_ID) - // Force an immediate update check + context.components.torController.registerTorListener(object : TorEvents { + override fun onTorConnected() { + context.components.torController.unregisterTorListener(this) + // Enable automatic updates. This must be done on every startup (tor-browser#42353) + context.components.addonUpdater.registerForFutureUpdates(NOSCRIPT_ID) + // Force a one-time immediate update check for older installations + if (settings.noscriptUpdated < 2) { context.components.addonUpdater.update(NOSCRIPT_ID) - settings.noscriptUpdated = 1 + settings.noscriptUpdated = 2 } + }
- @SuppressWarnings("EmptyFunctionBlock") - override fun onTorConnecting() { - } + @SuppressWarnings("EmptyFunctionBlock") + override fun onTorConnecting() { + }
- @SuppressWarnings("EmptyFunctionBlock") - override fun onTorStopped() { - } + @SuppressWarnings("EmptyFunctionBlock") + override fun onTorStopped() { + }
- @SuppressWarnings("EmptyFunctionBlock") - override fun onTorStatusUpdate(entry: String?, status: String?) { - } - }) - } + @SuppressWarnings("EmptyFunctionBlock") + override fun onTorStatusUpdate(entry: String?, status: String?) { + } + }) }
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/cb98...
tor-commits@lists.torproject.org