ma1 pushed to branch tor-browser-140.7.0esr-15.0-1 at The Tor Project /
Applications / Tor Browser
Commits:
2b6f6d20 by hackademix at 2026-01-26T20:50:45+01:00
fixup! [android] Modify add-on support
TB 44533: Install bundled NoScript extension at least once per build install
- - - - -
3 changed files:
-
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
- mobile/android/fenix/app/src/main/res/values/preference_keys.xml
Changes:
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TorBrowserFeatures.kt
=====================================
@@ -115,15 +115,19 @@ object TorBrowserFeatures {
)
}
/**
- * Install NoScript as a user WebExtension if we have not already
done so.
+ * Install NoScript if we have not done it yet for this browser
version.
* AMO signature is checked, but automatic updates still need to be
enabled.
*/
- if (!settings.noscriptInstalled) {
+ val extensionsVersion =
+ org.mozilla.geckoview.BuildConfig.MOZ_APP_VERSION + "-" +
+ org.mozilla.geckoview.BuildConfig.MOZ_APP_BUILDID + "-" +
+ org.mozilla.fenix.BuildConfig.VCS_HASH
+ if (settings.extensionsVersion != extensionsVersion) {
installNoScript(
context,
runtime,
onSuccess = {
- settings.noscriptInstalled = true
+ settings.extensionsVersion = extensionsVersion
logger.debug("NoScript extension was installed
successfully")
},
onError = { throwable ->
=====================================
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
=====================================
@@ -2151,14 +2151,9 @@ class Settings(private val appContext: Context) :
PreferencesHolder {
default = false,
)
- var noscriptInstalled by booleanPreference(
- appContext.getPreferenceKey(R.string.pref_key_noscript_installed),
- default = false
- )
-
- var noscriptUpdated by intPreference(
- appContext.getPreferenceKey(R.string.pref_key_noscript_updated),
- default = 0
+ var extensionsVersion by stringPreference(
+ appContext.getPreferenceKey(R.string.pref_key_extensions_version),
+ default = ""
)
var httpsEverywhereRemoved by booleanPreference(
=====================================
mobile/android/fenix/app/src/main/res/values/preference_keys.xml
=====================================
@@ -475,8 +475,7 @@
<string name="pref_key_setup_step_theme"
translatable="false">pref_key_setup_step_theme</string>
<string name="pref_key_setup_step_extensions"
translatable="false">pref_key_setup_step_extensions</string>
- <string name="pref_key_noscript_installed"
translatable="false">pref_key_noscript_installed</string>
- <string name="pref_key_noscript_updated"
translatable="false">pref_key_noscript_updated</string>
+ <string name="pref_key_extensions_version"
translatable="false">pref_key_extensions_version</string>
<string name="pref_key_https_everywhere_removed"
translatable="false">pref_key_https_everywhere_removed</string>
<!-- Security Level Settings -->
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2b6f6d20ff7d84504f19826f4fca73cbff082541
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2b6f6d20ff7d84504f19826f4fca73cbff082541
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]