[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/android-components][android-components-60.0.3-10.0-1] 2 commits: Bug 40019: Expose spoofEnglish pref



Title: GitLab

Matthew Finkel pushed to branch android-components-60.0.3-10.0-1 at The Tor Project / Applications / android-components

Commits:

3 changed files:

Changes:

  • components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
    ... ... @@ -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
     
    

  • components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
    ... ... @@ -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
     
    

  • components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt
    ... ... @@ -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> {
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits