[tor-commits] [Git][tpo/applications/android-components][android-components-60.0.3-10.0-1] 2 commits: Bug 40019: Expose spoofEnglish pref
Matthew Finkel
gitlab at torproject.org
Fri Oct 23 18:08:28 UTC 2020
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 'acatgl/40019+1' 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/ececa072e1c6fe1cd54fd1c74bfa241aab69779d...f57c6c10a0366d512103bd1b42190655d50c4f9b
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/ececa072e1c6fe1cd54fd1c74bfa241aab69779d...f57c6c10a0366d512103bd1b42190655d50c4f9b
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20201023/f7b6e029/attachment-0001.htm>
More information about the tor-commits
mailing list