Matthew Finkel pushed to branch android-components-57.0.6-10.0-2 at The Tor Project / Applications / android-components
Commits:
-
25f1f7c1
by Matthew Finkel at 2020-09-30T21:52:48+00:00
-
6f338e43
by Matthew Finkel at 2020-10-01T14:02:33+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:
| ... | ... | @@ -615,6 +615,14 @@ class GeckoEngine( |
| 615 | 615 |
override var forceUserScalableContent: Boolean
|
| 616 | 616 |
get() = runtime.settings.forceUserScalableEnabled
|
| 617 | 617 |
set(value) { runtime.settings.forceUserScalableEnabled = value }
|
| 618 |
+ |
|
| 619 |
+ override var torSecurityLevel: Int
|
|
| 620 |
+ get() = runtime.settings.torSecurityLevel
|
|
| 621 |
+ set(value) {
|
|
| 622 |
+ value.let {
|
|
| 623 |
+ runtime.settings.torSecurityLevel = it
|
|
| 624 |
+ }
|
|
| 625 |
+ }
|
|
| 618 | 626 |
}.apply {
|
| 619 | 627 |
defaultSettings?.let {
|
| 620 | 628 |
this.javascriptEnabled = it.javascriptEnabled
|
| ... | ... | @@ -631,6 +639,7 @@ class GeckoEngine( |
| 631 | 639 |
this.fontSizeFactor = it.fontSizeFactor
|
| 632 | 640 |
this.forceUserScalableContent = it.forceUserScalableContent
|
| 633 | 641 |
this.loginAutofillEnabled = it.loginAutofillEnabled
|
| 642 |
+ this.torSecurityLevel = it.torSecurityLevel
|
|
| 634 | 643 |
}
|
| 635 | 644 |
}
|
| 636 | 645 |
|
| ... | ... | @@ -615,6 +615,14 @@ class GeckoEngine( |
| 615 | 615 |
override var forceUserScalableContent: Boolean
|
| 616 | 616 |
get() = runtime.settings.forceUserScalableEnabled
|
| 617 | 617 |
set(value) { runtime.settings.forceUserScalableEnabled = value }
|
| 618 |
+ |
|
| 619 |
+ override var torSecurityLevel: Int
|
|
| 620 |
+ get() = runtime.settings.torSecurityLevel
|
|
| 621 |
+ set(value) {
|
|
| 622 |
+ value.let {
|
|
| 623 |
+ runtime.settings.torSecurityLevel = it
|
|
| 624 |
+ }
|
|
| 625 |
+ }
|
|
| 618 | 626 |
}.apply {
|
| 619 | 627 |
defaultSettings?.let {
|
| 620 | 628 |
this.javascriptEnabled = it.javascriptEnabled
|
| ... | ... | @@ -631,6 +639,7 @@ class GeckoEngine( |
| 631 | 639 |
this.fontSizeFactor = it.fontSizeFactor
|
| 632 | 640 |
this.forceUserScalableContent = it.forceUserScalableContent
|
| 633 | 641 |
this.loginAutofillEnabled = it.loginAutofillEnabled
|
| 642 |
+ this.torSecurityLevel = it.torSecurityLevel
|
|
| 634 | 643 |
}
|
| 635 | 644 |
}
|
| 636 | 645 |
|
| ... | ... | @@ -174,6 +174,11 @@ abstract class Settings { |
| 174 | 174 |
* Setting to force the ability to scale the content
|
| 175 | 175 |
*/
|
| 176 | 176 |
open var forceUserScalableContent: Boolean by UnsupportedSetting()
|
| 177 |
+ |
|
| 178 |
+ /**
|
|
| 179 |
+ * Setting to control the current security level
|
|
| 180 |
+ */
|
|
| 181 |
+ open var torSecurityLevel: Int by UnsupportedSetting()
|
|
| 177 | 182 |
}
|
| 178 | 183 |
|
| 179 | 184 |
/**
|
| ... | ... | @@ -208,7 +213,8 @@ data class DefaultSettings( |
| 208 | 213 |
override var fontInflationEnabled: Boolean? = null,
|
| 209 | 214 |
override var fontSizeFactor: Float? = null,
|
| 210 | 215 |
override var forceUserScalableContent: Boolean = false,
|
| 211 |
- override var loginAutofillEnabled: Boolean = false
|
|
| 216 |
+ override var loginAutofillEnabled: Boolean = false,
|
|
| 217 |
+ override var torSecurityLevel: Int = 0
|
|
| 212 | 218 |
) : Settings()
|
| 213 | 219 |
|
| 214 | 220 |
class UnsupportedSetting<T> {
|