lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2026 -----
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 20048 discussions
[Git][tpo/applications/android-components][android-components-60.0.5-10.0-1] Bug 40019: Expose spoofEnglish pref
by Matthew Finkel 23 Oct '20

23 Oct '20
Matthew Finkel pushed to branch android-components-60.0.5-10.0-1 at The Tor Project / Applications / android-components Commits: c2d4d984 by Alex Catarineu at 2020-10-23T18:11:02+00:00 Bug 40019: Expose spoofEnglish pref - - - - - 3 changed files: - components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt - components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt - components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt Changes: ===================================== components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt ===================================== @@ -608,6 +608,14 @@ class GeckoEngine( runtime.settings.torSecurityLevel = it } } + override var spoofEnglish: Boolean + get() = runtime.settings.spoofEnglish + set(value) { + value.let { + runtime.settings.spoofEnglish = it + localeUpdater.updateValue() + } + } }.apply { defaultSettings?.let { this.javascriptEnabled = it.javascriptEnabled @@ -625,6 +633,7 @@ class GeckoEngine( this.forceUserScalableContent = it.forceUserScalableContent this.loginAutofillEnabled = it.loginAutofillEnabled this.torSecurityLevel = it.torSecurityLevel + this.spoofEnglish = it.spoofEnglish } } ===================================== components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt ===================================== @@ -608,6 +608,14 @@ class GeckoEngine( runtime.settings.torSecurityLevel = it } } + override var spoofEnglish: Boolean + get() = runtime.settings.spoofEnglish + set(value) { + value.let { + runtime.settings.spoofEnglish = it + localeUpdater.updateValue() + } + } }.apply { defaultSettings?.let { this.javascriptEnabled = it.javascriptEnabled @@ -625,6 +633,7 @@ class GeckoEngine( this.forceUserScalableContent = it.forceUserScalableContent this.loginAutofillEnabled = it.loginAutofillEnabled this.torSecurityLevel = it.torSecurityLevel + this.spoofEnglish = it.spoofEnglish } } ===================================== components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt ===================================== @@ -179,6 +179,8 @@ abstract class Settings { * Setting to control the current security level */ open var torSecurityLevel: Int by UnsupportedSetting() + + open var spoofEnglish: Boolean by UnsupportedSetting() } /** @@ -214,7 +216,8 @@ data class DefaultSettings( override var fontSizeFactor: Float? = null, override var forceUserScalableContent: Boolean = false, override var loginAutofillEnabled: Boolean = false, - override var torSecurityLevel: Int = 4 + override var torSecurityLevel: Int = 4, + override var spoofEnglish: Boolean = false ) : Settings() class UnsupportedSetting<T> { View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/commit/… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/commit/… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/android-components][android-components-60.0.3-10.0-1] 2 commits: Bug 40019: Expose spoofEnglish pref
by Matthew Finkel 23 Oct '20

23 Oct '20
Matthew Finkel pushed to branch android-components-60.0.3-10.0-1 at The Tor Project / Applications / android-components Commits: 5c662aa1 by Alex Catarineu at 2020-10-19T21:06:49+02:00 Bug 40019: Expose spoofEnglish pref - - - - - f57c6c10 by Matthew Finkel at 2020-10-23T18:08:18+00:00 Merge remote-tracking branch &#39;acatgl/40019+1&#39; into android-components-60.0.3-10.0-1 - - - - - 3 changed files: - components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt - components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt - components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt Changes: ===================================== components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt ===================================== @@ -608,6 +608,14 @@ class GeckoEngine( runtime.settings.torSecurityLevel = it } } + override var spoofEnglish: Boolean + get() = runtime.settings.spoofEnglish + set(value) { + value.let { + runtime.settings.spoofEnglish = it + localeUpdater.updateValue() + } + } }.apply { defaultSettings?.let { this.javascriptEnabled = it.javascriptEnabled @@ -625,6 +633,7 @@ class GeckoEngine( this.forceUserScalableContent = it.forceUserScalableContent this.loginAutofillEnabled = it.loginAutofillEnabled this.torSecurityLevel = it.torSecurityLevel + this.spoofEnglish = it.spoofEnglish } } ===================================== components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt ===================================== @@ -608,6 +608,14 @@ class GeckoEngine( runtime.settings.torSecurityLevel = it } } + override var spoofEnglish: Boolean + get() = runtime.settings.spoofEnglish + set(value) { + value.let { + runtime.settings.spoofEnglish = it + localeUpdater.updateValue() + } + } }.apply { defaultSettings?.let { this.javascriptEnabled = it.javascriptEnabled @@ -625,6 +633,7 @@ class GeckoEngine( this.forceUserScalableContent = it.forceUserScalableContent this.loginAutofillEnabled = it.loginAutofillEnabled this.torSecurityLevel = it.torSecurityLevel + this.spoofEnglish = it.spoofEnglish } } ===================================== components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt ===================================== @@ -179,6 +179,8 @@ abstract class Settings { * Setting to control the current security level */ open var torSecurityLevel: Int by UnsupportedSetting() + + open var spoofEnglish: Boolean by UnsupportedSetting() } /** @@ -214,7 +216,8 @@ data class DefaultSettings( override var fontSizeFactor: Float? = null, override var forceUserScalableContent: Boolean = false, override var loginAutofillEnabled: Boolean = false, - override var torSecurityLevel: Int = 4 + override var torSecurityLevel: Int = 4, + override var spoofEnglish: Boolean = false ) : Settings() class UnsupportedSetting<T> { View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[tor-browser/tor-browser-82.0-10.0-1] Bug 40198: Expose privacy.spoof_english pref in GeckoView
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit f053018860f048866a390bacca7be1d381c5726b Author: Alex Catarineu <acat(a)torproject.org> Date: Sun Oct 18 17:06:04 2020 +0200 Bug 40198: Expose privacy.spoof_english pref in GeckoView --- mobile/android/geckoview/api.txt | 3 ++ .../mozilla/geckoview/GeckoRuntimeSettings.java | 33 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/mobile/android/geckoview/api.txt b/mobile/android/geckoview/api.txt index 9f15c8be0138..5e64688b7e47 100644 --- a/mobile/android/geckoview/api.txt +++ b/mobile/android/geckoview/api.txt @@ -577,6 +577,7 @@ package org.mozilla.geckoview { method public boolean getRemoteDebuggingEnabled(); method @Nullable public GeckoRuntime getRuntime(); method @Nullable public Rect getScreenSizeOverride(); + method public boolean getSpoofEnglish(); method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate(); method public int getTorSecurityLevel(); method public boolean getUseMaxScreenDepth(); @@ -597,6 +598,7 @@ package org.mozilla.geckoview { method @NonNull public GeckoRuntimeSettings setLoginAutofillEnabled(boolean); method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int); method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean); + method @NonNull public GeckoRuntimeSettings setSpoofEnglish(boolean); method @NonNull public GeckoRuntimeSettings setTorSecurityLevel(int); method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean); method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean); @@ -632,6 +634,7 @@ package org.mozilla.geckoview { method @NonNull public GeckoRuntimeSettings.Builder preferredColorScheme(int); method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean); method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int); + method @NonNull public GeckoRuntimeSettings.Builder spoofEnglish(boolean); method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate); method @NonNull public GeckoRuntimeSettings.Builder torSecurityLevel(int); method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean); diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java index b7c080557470..5bad77d4f880 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java @@ -468,6 +468,17 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { getSettings().mTorSecurityLevel.set(level); return this; } + + /** + * Sets whether we should spoof locale to English for webpages. + * + * @param flag True if we should spoof locale to English for webpages, false otherwise. + * @return This Builder instance. + */ + public @NonNull Builder spoofEnglish(final boolean flag) { + getSettings().mSpoofEnglish.set(flag ? 2 : 1); + return this; + } } private GeckoRuntime mRuntime; @@ -520,6 +531,8 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { "signon.autofillForms", true); /* package */ final Pref<Integer> mTorSecurityLevel = new Pref<>( "extensions.torbutton.security_slider", 4); + /* package */ final Pref<Integer> mSpoofEnglish = new Pref<>( + "privacy.spoof_english", 0); /* package */ int mPreferredColorScheme = COLOR_SCHEME_SYSTEM; @@ -1196,6 +1209,26 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { return this; } + /** + * Get whether we should spoof locale to English for webpages. + * + * @return Whether we should spoof locale to English for webpages. + */ + public boolean getSpoofEnglish() { + return mSpoofEnglish.get() == 2; + } + + /** + * Set whether we should spoof locale to English for webpages. + * + * @param flag A flag determining whether we should locale to English for webpages. + * @return This GeckoRuntimeSettings instance. + */ + public @NonNull GeckoRuntimeSettings setSpoofEnglish(final boolean flag) { + mSpoofEnglish.commit(flag ? 2 : 1); + return this; + } + @Override // Parcelable public void writeToParcel(final Parcel out, final int flags) { super.writeToParcel(out, flags);
1 0
0 0
[tor-browser/tor-browser-82.0-10.0-1] Bug 30605: Honor privacy.spoof_english in Android
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit 0094bc69860877bb8f49c73751e8b98975eea50c Author: Alex Catarineu <acat(a)torproject.org> Date: Fri Oct 16 10:45:17 2020 +0200 Bug 30605: Honor privacy.spoof_english in Android This checks `privacy.spoof_english` whenever `setLocales` is called from Fenix side and sets `intl.accept_languages` accordingly. --- mobile/android/components/geckoview/GeckoViewStartup.jsm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mobile/android/components/geckoview/GeckoViewStartup.jsm b/mobile/android/components/geckoview/GeckoViewStartup.jsm index a6cbb442e862..ca746f7428a7 100644 --- a/mobile/android/components/geckoview/GeckoViewStartup.jsm +++ b/mobile/android/components/geckoview/GeckoViewStartup.jsm @@ -18,6 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { Preferences: "resource://gre/modules/Preferences.jsm", SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm", Services: "resource://gre/modules/Services.jsm", + RFPHelper: "resource://gre/modules/RFPHelper.jsm", }); const { debug, warn } = GeckoViewUtils.initLogging("Startup"); @@ -246,6 +247,10 @@ class GeckoViewStartup { if (aData.requestedLocales) { Services.locale.requestedLocales = aData.requestedLocales; } + RFPHelper._handleSpoofEnglishChanged(); + if (Services.prefs.getIntPref("privacy.spoof_english", 0) === 2) { + break; + } const pls = Cc["@mozilla.org/pref-localizedstring;1"].createInstance( Ci.nsIPrefLocalizedString );
1 0
0 0
[tor-browser/tor-browser-82.0-10.0-1] Bug 40199: Avoid using system locale for intl.accept_languages in GeckoView
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit de1e216305d3d86ad9a5d925a668115e331685a2 Author: Alex Catarineu <acat(a)torproject.org> Date: Tue Oct 20 17:44:36 2020 +0200 Bug 40199: Avoid using system locale for intl.accept_languages in GeckoView --- .../mozilla/geckoview/GeckoRuntimeSettings.java | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java index 85517821b59a..b7c080557470 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java @@ -783,19 +783,25 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { private String computeAcceptLanguages() { ArrayList<String> locales = new ArrayList<String>(); - // Explicitly-set app prefs come first: - if (mRequestedLocales != null) { - for (String locale : mRequestedLocales) { - locales.add(locale.toLowerCase()); - } - } - // OS prefs come second: - for (String locale : getDefaultLocales()) { - locale = locale.toLowerCase(); - if (!locales.contains(locale)) { + // In Desktop, these are defined in the `intl.accept_languages` localized property. + // At some point we should probably use the same values here, but for now we use a simple + // strategy which will hopefully result in reasonable acceptLanguage values. + if (mRequestedLocales != null && mRequestedLocales.length > 0) { + String locale = mRequestedLocales[0].toLowerCase(); + // No need to include `en-us` twice. + if (!locale.equals("en-us")) { locales.add(locale); + if (locale.contains("-")) { + String lang = locale.split("-")[0]; + // No need to include `en` twice. + if (!lang.equals("en")) { + locales.add(lang); + } + } } } + locales.add("en-us"); + locales.add("en"); return TextUtils.join(",", locales); }
1 0
0 0
[tor-browser/tor-browser-82.0b7-10.0-1] Bug 30605: Honor privacy.spoof_english in Android
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit ff917f5073bae12a0dd7ad1ad7c93d2236be6247 Author: Alex Catarineu <acat(a)torproject.org> Date: Fri Oct 16 10:45:17 2020 +0200 Bug 30605: Honor privacy.spoof_english in Android This checks `privacy.spoof_english` whenever `setLocales` is called from Fenix side and sets `intl.accept_languages` accordingly. --- mobile/android/components/geckoview/GeckoViewStartup.jsm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mobile/android/components/geckoview/GeckoViewStartup.jsm b/mobile/android/components/geckoview/GeckoViewStartup.jsm index a6cbb442e862..ca746f7428a7 100644 --- a/mobile/android/components/geckoview/GeckoViewStartup.jsm +++ b/mobile/android/components/geckoview/GeckoViewStartup.jsm @@ -18,6 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { Preferences: "resource://gre/modules/Preferences.jsm", SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm", Services: "resource://gre/modules/Services.jsm", + RFPHelper: "resource://gre/modules/RFPHelper.jsm", }); const { debug, warn } = GeckoViewUtils.initLogging("Startup"); @@ -246,6 +247,10 @@ class GeckoViewStartup { if (aData.requestedLocales) { Services.locale.requestedLocales = aData.requestedLocales; } + RFPHelper._handleSpoofEnglishChanged(); + if (Services.prefs.getIntPref("privacy.spoof_english", 0) === 2) { + break; + } const pls = Cc["@mozilla.org/pref-localizedstring;1"].createInstance( Ci.nsIPrefLocalizedString );
1 0
0 0
[tor-browser/tor-browser-82.0b7-10.0-1] Bug 40199: Avoid using system locale for intl.accept_languages in GeckoView
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit 00d90dd2a581fb897f035d0c5620b4a3424221ec Author: Alex Catarineu <acat(a)torproject.org> Date: Tue Oct 20 17:44:36 2020 +0200 Bug 40199: Avoid using system locale for intl.accept_languages in GeckoView --- .../mozilla/geckoview/GeckoRuntimeSettings.java | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java index 85517821b59a..b7c080557470 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java @@ -783,19 +783,25 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { private String computeAcceptLanguages() { ArrayList<String> locales = new ArrayList<String>(); - // Explicitly-set app prefs come first: - if (mRequestedLocales != null) { - for (String locale : mRequestedLocales) { - locales.add(locale.toLowerCase()); - } - } - // OS prefs come second: - for (String locale : getDefaultLocales()) { - locale = locale.toLowerCase(); - if (!locales.contains(locale)) { + // In Desktop, these are defined in the `intl.accept_languages` localized property. + // At some point we should probably use the same values here, but for now we use a simple + // strategy which will hopefully result in reasonable acceptLanguage values. + if (mRequestedLocales != null && mRequestedLocales.length > 0) { + String locale = mRequestedLocales[0].toLowerCase(); + // No need to include `en-us` twice. + if (!locale.equals("en-us")) { locales.add(locale); + if (locale.contains("-")) { + String lang = locale.split("-")[0]; + // No need to include `en` twice. + if (!lang.equals("en")) { + locales.add(lang); + } + } } } + locales.add("en-us"); + locales.add("en"); return TextUtils.join(",", locales); }
1 0
0 0
[tor-browser/tor-browser-82.0b7-10.0-1] Bug 40198: Expose privacy.spoof_english pref in GeckoView
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit fd2a780a04f59224176507e34c6f3194acb20e03 Author: Alex Catarineu <acat(a)torproject.org> Date: Sun Oct 18 17:06:04 2020 +0200 Bug 40198: Expose privacy.spoof_english pref in GeckoView --- mobile/android/geckoview/api.txt | 3 ++ .../mozilla/geckoview/GeckoRuntimeSettings.java | 33 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/mobile/android/geckoview/api.txt b/mobile/android/geckoview/api.txt index 9f15c8be0138..5e64688b7e47 100644 --- a/mobile/android/geckoview/api.txt +++ b/mobile/android/geckoview/api.txt @@ -577,6 +577,7 @@ package org.mozilla.geckoview { method public boolean getRemoteDebuggingEnabled(); method @Nullable public GeckoRuntime getRuntime(); method @Nullable public Rect getScreenSizeOverride(); + method public boolean getSpoofEnglish(); method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate(); method public int getTorSecurityLevel(); method public boolean getUseMaxScreenDepth(); @@ -597,6 +598,7 @@ package org.mozilla.geckoview { method @NonNull public GeckoRuntimeSettings setLoginAutofillEnabled(boolean); method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int); method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean); + method @NonNull public GeckoRuntimeSettings setSpoofEnglish(boolean); method @NonNull public GeckoRuntimeSettings setTorSecurityLevel(int); method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean); method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean); @@ -632,6 +634,7 @@ package org.mozilla.geckoview { method @NonNull public GeckoRuntimeSettings.Builder preferredColorScheme(int); method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean); method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int); + method @NonNull public GeckoRuntimeSettings.Builder spoofEnglish(boolean); method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate); method @NonNull public GeckoRuntimeSettings.Builder torSecurityLevel(int); method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean); diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java index 85517821b59a..e5092936bea9 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java @@ -468,6 +468,17 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { getSettings().mTorSecurityLevel.set(level); return this; } + + /** + * Sets whether we should spoof locale to English for webpages. + * + * @param flag True if we should spoof locale to English for webpages, false otherwise. + * @return This Builder instance. + */ + public @NonNull Builder spoofEnglish(final boolean flag) { + getSettings().mSpoofEnglish.set(flag ? 2 : 1); + return this; + } } private GeckoRuntime mRuntime; @@ -520,6 +531,8 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { "signon.autofillForms", true); /* package */ final Pref<Integer> mTorSecurityLevel = new Pref<>( "extensions.torbutton.security_slider", 4); + /* package */ final Pref<Integer> mSpoofEnglish = new Pref<>( + "privacy.spoof_english", 0); /* package */ int mPreferredColorScheme = COLOR_SCHEME_SYSTEM; @@ -1190,6 +1203,26 @@ public final class GeckoRuntimeSettings extends RuntimeSettings { return this; } + /** + * Get whether we should spoof locale to English for webpages. + * + * @return Whether we should spoof locale to English for webpages. + */ + public boolean getSpoofEnglish() { + return mSpoofEnglish.get() == 2; + } + + /** + * Set whether we should spoof locale to English for webpages. + * + * @param flag A flag determining whether we should locale to English for webpages. + * @return This GeckoRuntimeSettings instance. + */ + public @NonNull GeckoRuntimeSettings setSpoofEnglish(final boolean flag) { + mSpoofEnglish.commit(flag ? 2 : 1); + return this; + } + @Override // Parcelable public void writeToParcel(final Parcel out, final int flags) { super.writeToParcel(out, flags);
1 0
0 0
[tor-browser/tor-browser-82.0b7-10.0-1] Merge remote-tracking branch 'acatgl/40199' into tor-browser-82.0b7-10.0-1
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit 0ab249ad7cc37ce4024a753e03dd9dc86fb03253 Merge: ff917f5073ba 00d90dd2a581 Author: Matthew Finkel <sysrqb(a)torproject.org> Date: Fri Oct 23 18:03:08 2020 +0000 Merge remote-tracking branch 'acatgl/40199' into tor-browser-82.0b7-10.0-1 .../mozilla/geckoview/GeckoRuntimeSettings.java | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-)
1 0
0 0
[tor-browser/tor-browser-82.0b7-10.0-1] Merge remote-tracking branch 'acatgl/40198+1' into tor-browser-82.0b7-10.0-1
by sysrqb@torproject.org 23 Oct '20

23 Oct '20
commit 56077640f8acf22ba6591ded019492237d48e910 Merge: 0ab249ad7cc3 fd2a780a04f5 Author: Matthew Finkel <sysrqb(a)torproject.org> Date: Fri Oct 23 18:04:19 2020 +0000 Merge remote-tracking branch 'acatgl/40198+1' into tor-browser-82.0b7-10.0-1 mobile/android/geckoview/api.txt | 3 ++ .../mozilla/geckoview/GeckoRuntimeSettings.java | 33 ++++++++++++++++++++++ 2 files changed, 36 insertions(+)
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1321
  • 1322
  • 1323
  • 1324
  • 1325
  • 1326
  • 1327
  • ...
  • 2005
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.