[tbb-commits] [Git][tpo/applications/android-components][android-components-57.0.6-10.0-2] 2 commits: Bug 40006: Expose Security Level interface

Matthew Finkel gitlab at torproject.org
Thu Oct 1 14:02:49 UTC 2020



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
Bug 40006: Expose Security Level interface

- - - - -
6f338e43 by Matthew Finkel at 2020-10-01T14:02:33+00:00
Merge branch 'bug_40006_02' into android-components-57.0.6-10.0-2

- - - - -


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
=====================================
@@ -615,6 +615,14 @@ class GeckoEngine(
         override var forceUserScalableContent: Boolean
             get() = runtime.settings.forceUserScalableEnabled
             set(value) { runtime.settings.forceUserScalableEnabled = value }
+
+        override var torSecurityLevel: Int
+            get() = runtime.settings.torSecurityLevel
+            set(value) {
+                value.let {
+                    runtime.settings.torSecurityLevel = it
+                }
+            }
     }.apply {
         defaultSettings?.let {
             this.javascriptEnabled = it.javascriptEnabled
@@ -631,6 +639,7 @@ class GeckoEngine(
             this.fontSizeFactor = it.fontSizeFactor
             this.forceUserScalableContent = it.forceUserScalableContent
             this.loginAutofillEnabled = it.loginAutofillEnabled
+            this.torSecurityLevel = it.torSecurityLevel
         }
     }
 


=====================================
components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
=====================================
@@ -615,6 +615,14 @@ class GeckoEngine(
         override var forceUserScalableContent: Boolean
             get() = runtime.settings.forceUserScalableEnabled
             set(value) { runtime.settings.forceUserScalableEnabled = value }
+
+        override var torSecurityLevel: Int
+            get() = runtime.settings.torSecurityLevel
+            set(value) {
+                value.let {
+                    runtime.settings.torSecurityLevel = it
+                }
+            }
     }.apply {
         defaultSettings?.let {
             this.javascriptEnabled = it.javascriptEnabled
@@ -631,6 +639,7 @@ class GeckoEngine(
             this.fontSizeFactor = it.fontSizeFactor
             this.forceUserScalableContent = it.forceUserScalableContent
             this.loginAutofillEnabled = it.loginAutofillEnabled
+            this.torSecurityLevel = it.torSecurityLevel
         }
     }
 


=====================================
components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt
=====================================
@@ -174,6 +174,11 @@ abstract class Settings {
      * Setting to force the ability to scale the content
      */
     open var forceUserScalableContent: Boolean by UnsupportedSetting()
+
+    /**
+     * Setting to control the current security level
+     */
+    open var torSecurityLevel: Int by UnsupportedSetting()
 }
 
 /**
@@ -208,7 +213,8 @@ data class DefaultSettings(
     override var fontInflationEnabled: Boolean? = null,
     override var fontSizeFactor: Float? = null,
     override var forceUserScalableContent: Boolean = false,
-    override var loginAutofillEnabled: Boolean = false
+    override var loginAutofillEnabled: Boolean = false,
+    override var torSecurityLevel: Int = 0
 ) : Settings()
 
 class UnsupportedSetting<T> {



View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/b8ebf04f5f5adfea3336e285909ed5d668cc385b...6f338e432576671d8edaf48bbfb0c164d0162be4

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/b8ebf04f5f5adfea3336e285909ed5d668cc385b...6f338e432576671d8edaf48bbfb0c164d0162be4
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/tbb-commits/attachments/20201001/7b902c01/attachment-0001.htm>


More information about the tbb-commits mailing list