ma1 pushed to branch tor-browser-147.0a1-16.0-2 at The Tor Project /
Applications / Tor Browser
Commits:
3aaba973 by hackademix at 2026-01-26T20:40:28+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
=====================================
@@ -2481,14 +2481,9 @@ class Settings(
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
=====================================
@@ -523,8 +523,7 @@
<string name="pref_key_tab_manager_enhancements"
translatable="false">pref_key_tab_manager_enhancements</string>
<string name="pref_key_tab_manager_opening_animation"
translatable="false">pref_key_tab_manager_opening_animation</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/3aaba973c7021a7eab121349068a1dc52cdf8470
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/3aaba973c7021a7eab121349068a1dc52cdf8470
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]