[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 01/06: fixup! Bug 30605: Honor privacy.spoof_english in Android
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-102.3.0esr-12.0-2
in repository tor-browser.
commit 6658c0005accfb1a4bbe659a58b20f5be45ff7b8
Author: Pier Angelo Vendrame <pierov@xxxxxxxxxxxxxx>
AuthorDate: Fri Sep 30 11:38:26 2022 +0200
fixup! Bug 30605: Honor privacy.spoof_english in Android
Added the missing Java related variable
---
.../org/mozilla/geckoview/GeckoRuntimeSettings.java | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
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 48d13963d0b6..032903007e3c 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
@@ -523,6 +523,7 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
/* package */ final Pref<Boolean> mHttpsOnlyPrivateMode =
new Pref<Boolean>("dom.security.https_only_mode_pbm", false);
/* package */ final Pref<Integer> mProcessCount = new Pref<>("dom.ipc.processCount", 2);
+ /* package */ final Pref<Integer> mSpoofEnglish = new Pref<>("privacy.spoof_english", 0);
/* package */ int mPreferredColorScheme = COLOR_SCHEME_SYSTEM;
@@ -1267,6 +1268,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);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits