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
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:
| ... | ... | @@ -608,6 +608,14 @@ class GeckoEngine( |
| 608 | 608 |
runtime.settings.torSecurityLevel = it
|
| 609 | 609 |
}
|
| 610 | 610 |
}
|
| 611 |
+ override var spoofEnglish: Boolean
|
|
| 612 |
+ get() = runtime.settings.spoofEnglish
|
|
| 613 |
+ set(value) {
|
|
| 614 |
+ value.let {
|
|
| 615 |
+ runtime.settings.spoofEnglish = it
|
|
| 616 |
+ localeUpdater.updateValue()
|
|
| 617 |
+ }
|
|
| 618 |
+ }
|
|
| 611 | 619 |
}.apply {
|
| 612 | 620 |
defaultSettings?.let {
|
| 613 | 621 |
this._javascript_Enabled = it._javascript_Enabled
|
| ... | ... | @@ -625,6 +633,7 @@ class GeckoEngine( |
| 625 | 633 |
this.forceUserScalableContent = it.forceUserScalableContent
|
| 626 | 634 |
this.loginAutofillEnabled = it.loginAutofillEnabled
|
| 627 | 635 |
this.torSecurityLevel = it.torSecurityLevel
|
| 636 |
+ this.spoofEnglish = it.spoofEnglish
|
|
| 628 | 637 |
}
|
| 629 | 638 |
}
|
| 630 | 639 |
|
| ... | ... | @@ -608,6 +608,14 @@ class GeckoEngine( |
| 608 | 608 |
runtime.settings.torSecurityLevel = it
|
| 609 | 609 |
}
|
| 610 | 610 |
}
|
| 611 |
+ override var spoofEnglish: Boolean
|
|
| 612 |
+ get() = runtime.settings.spoofEnglish
|
|
| 613 |
+ set(value) {
|
|
| 614 |
+ value.let {
|
|
| 615 |
+ runtime.settings.spoofEnglish = it
|
|
| 616 |
+ localeUpdater.updateValue()
|
|
| 617 |
+ }
|
|
| 618 |
+ }
|
|
| 611 | 619 |
}.apply {
|
| 612 | 620 |
defaultSettings?.let {
|
| 613 | 621 |
this._javascript_Enabled = it._javascript_Enabled
|
| ... | ... | @@ -625,6 +633,7 @@ class GeckoEngine( |
| 625 | 633 |
this.forceUserScalableContent = it.forceUserScalableContent
|
| 626 | 634 |
this.loginAutofillEnabled = it.loginAutofillEnabled
|
| 627 | 635 |
this.torSecurityLevel = it.torSecurityLevel
|
| 636 |
+ this.spoofEnglish = it.spoofEnglish
|
|
| 628 | 637 |
}
|
| 629 | 638 |
}
|
| 630 | 639 |
|
| ... | ... | @@ -179,6 +179,8 @@ abstract class Settings { |
| 179 | 179 |
* Setting to control the current security level
|
| 180 | 180 |
*/
|
| 181 | 181 |
open var torSecurityLevel: Int by UnsupportedSetting()
|
| 182 |
+ |
|
| 183 |
+ open var spoofEnglish: Boolean by UnsupportedSetting()
|
|
| 182 | 184 |
}
|
| 183 | 185 |
|
| 184 | 186 |
/**
|
| ... | ... | @@ -214,7 +216,8 @@ data class DefaultSettings( |
| 214 | 216 |
override var fontSizeFactor: Float? = null,
|
| 215 | 217 |
override var forceUserScalableContent: Boolean = false,
|
| 216 | 218 |
override var loginAutofillEnabled: Boolean = false,
|
| 217 |
- override var torSecurityLevel: Int = 4
|
|
| 219 |
+ override var torSecurityLevel: Int = 4,
|
|
| 220 |
+ override var spoofEnglish: Boolean = false
|
|
| 218 | 221 |
) : Settings()
|
| 219 | 222 |
|
| 220 | 223 |
class UnsupportedSetting<T> {
|