Pier Angelo Vendrame pushed to branch android-components-102.0.14-12.0-1 at The Tor Project / Applications / android-components
Commits: 43499dfb by Pier Angelo Vendrame at 2022-10-26T10:46:22+02:00 squash! Add support for new GeckoView interfaces
Bug 41394: Expose privacy.prioritizeonions.enabled to Android.
- - - - -
2 changed files:
- 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/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt ===================================== @@ -741,6 +741,13 @@ class GeckoEngine( localeUpdater.updateValue() } } + override var prioritizeOnions: Boolean + get() = runtime.settings.prioritizeOnions + set(value) { + value.let { + runtime.settings.prioritizeOnions = it + } + } }.apply { defaultSettings?.let { this.javascriptEnabled = it.javascriptEnabled @@ -762,6 +769,7 @@ class GeckoEngine( this.httpsOnlyMode = it.httpsOnlyMode this.torSecurityLevel = it.torSecurityLevel this.spoofEnglish = it.spoofEnglish + this.prioritizeOnions = it.prioritizeOnions } }
===================================== components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt ===================================== @@ -196,6 +196,8 @@ abstract class Settings { open var torSecurityLevel: Int by UnsupportedSetting()
open var spoofEnglish: Boolean by UnsupportedSetting() + + open var prioritizeOnions: Boolean by UnsupportedSetting() }
/** @@ -235,7 +237,8 @@ data class DefaultSettings( override var enterpriseRootsEnabled: Boolean = false, override var httpsOnlyMode: Engine.HttpsOnlyMode = Engine.HttpsOnlyMode.DISABLED, override var torSecurityLevel: Int = 4, - override var spoofEnglish: Boolean = false + override var spoofEnglish: Boolean = false, + override var prioritizeOnions: Boolean = false ) : Settings()
class UnsupportedSetting<T> {
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/commit/4...