ma1 pushed to branch firefox-android-115.2.1-13.0-1 at The Tor Project / Applications / firefox-android
Commits:
-
df68d28d
by hackademix at 2024-03-13T19:03:07+01:00
8 changed files:
- android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
- android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt
- fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
- fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
- fenix/app/src/main/res/values/preference_keys.xml
- fenix/app/src/main/res/values/torbrowser_strings.xml
- fenix/app/src/main/res/xml/preferences.xml
Changes:
... | ... | @@ -796,9 +796,6 @@ class GeckoEngine( |
796 | 796 | localeUpdater.updateValue()
|
797 | 797 | }
|
798 | 798 | }
|
799 | - override var prioritizeOnions: Boolean
|
|
800 | - get() = runtime.settings.prioritizeOnions
|
|
801 | - set(value) { runtime.settings.prioritizeOnions = value }
|
|
802 | 799 | }.apply {
|
803 | 800 | defaultSettings?.let {
|
804 | 801 | this.javascriptEnabled = it.javascriptEnabled
|
... | ... | @@ -823,7 +820,6 @@ class GeckoEngine( |
823 | 820 | this.cookieBannerHandlingDetectOnlyMode = it.cookieBannerHandlingDetectOnlyMode
|
824 | 821 | this.torSecurityLevel = it.torSecurityLevel
|
825 | 822 | this.spoofEnglish = it.spoofEnglish
|
826 | - this.prioritizeOnions = it.prioritizeOnions
|
|
827 | 823 | }
|
828 | 824 | }
|
829 | 825 |
... | ... | @@ -213,7 +213,6 @@ abstract class Settings { |
213 | 213 | |
214 | 214 | open var spoofEnglish: Boolean by UnsupportedSetting()
|
215 | 215 | |
216 | - open var prioritizeOnions: Boolean by UnsupportedSetting()
|
|
217 | 216 | }
|
218 | 217 | |
219 | 218 | /**
|
... | ... | @@ -258,7 +257,6 @@ data class DefaultSettings( |
258 | 257 | override var cookieBannerHandlingDetectOnlyMode: Boolean = false,
|
259 | 258 | override var torSecurityLevel: Int = 4,
|
260 | 259 | override var spoofEnglish: Boolean = false,
|
261 | - override var prioritizeOnions: Boolean = false,
|
|
262 | 260 | ) : Settings()
|
263 | 261 | |
264 | 262 | class UnsupportedSetting<T> {
|
... | ... | @@ -145,7 +145,6 @@ class Core( |
145 | 145 | .shouldShowCookieBannerReEngagementDialog(),
|
146 | 146 | torSecurityLevel = context.settings().torSecurityLevel().intRepresentation,
|
147 | 147 | spoofEnglish = context.settings().spoofEnglish,
|
148 | - prioritizeOnions = context.settings().prioritizeOnions,
|
|
149 | 148 | )
|
150 | 149 | |
151 | 150 | GeckoEngine(
|
... | ... | @@ -462,10 +462,8 @@ class SettingsFragment : PreferenceFragmentCompat() { |
462 | 462 | }
|
463 | 463 | |
464 | 464 | private fun setupPreferences() {
|
465 | - val prioritizeOnionsKey = getPreferenceKey(R.string.pref_key_tor_prioritize_onions)
|
|
466 | 465 | val leakKey = getPreferenceKey(R.string.pref_key_leakcanary)
|
467 | 466 | val debuggingKey = getPreferenceKey(R.string.pref_key_remote_debugging)
|
468 | - val preferencePrioritizeOnions = findPreference<Preference>(prioritizeOnionsKey)
|
|
469 | 467 | val preferenceLeakCanary = findPreference<Preference>(leakKey)
|
470 | 468 | val preferenceRemoteDebugging = findPreference<Preference>(debuggingKey)
|
471 | 469 | val preferenceMakeDefaultBrowser =
|
... | ... | @@ -484,13 +482,6 @@ class SettingsFragment : PreferenceFragmentCompat() { |
484 | 482 | }
|
485 | 483 | }
|
486 | 484 | |
487 | - preferencePrioritizeOnions?.setOnPreferenceChangeListener<Boolean> { preference, newValue ->
|
|
488 | - preference.context.settings().preferences.edit()
|
|
489 | - .putBoolean(preference.key, newValue).apply()
|
|
490 | - requireComponents.core.engine.settings.prioritizeOnions = newValue
|
|
491 | - true
|
|
492 | - }
|
|
493 | - |
|
494 | 485 | if (!Config.channel.isReleased) {
|
495 | 486 | preferenceLeakCanary?.setOnPreferenceChangeListener { _, newValue ->
|
496 | 487 | val isEnabled = newValue == true
|
... | ... | @@ -335,11 +335,6 @@ class Settings(private val appContext: Context) : PreferencesHolder { |
335 | 335 | default = false
|
336 | 336 | )
|
337 | 337 | |
338 | - var prioritizeOnions by booleanPreference(
|
|
339 | - appContext.getPreferenceKey(R.string.pref_key_tor_prioritize_onions),
|
|
340 | - default = false
|
|
341 | - )
|
|
342 | - |
|
343 | 338 | var defaultSearchEngineName by stringPreference(
|
344 | 339 | appContext.getPreferenceKey(R.string.pref_key_search_engine),
|
345 | 340 | default = "",
|
... | ... | @@ -390,6 +390,4 @@ |
390 | 390 | <string name="pref_key_tor_network_settings_bridges_enabled">pref_key_tor_network_settings_bridges_enabled</string>
|
391 | 391 | |
392 | 392 | <string name="pref_key_spoof_english" translatable="false">pref_key_spoof_english</string>
|
393 | - |
|
394 | - <string name="pref_key_tor_prioritize_onions" translatable="false">pref_key_tor_prioritize_onions</string>
|
|
395 | 393 | </resources> |
... | ... | @@ -72,7 +72,5 @@ |
72 | 72 | |
73 | 73 | <!-- Spoof locale to English -->
|
74 | 74 | <string name="tor_spoof_english">Request English versions of web pages for enhanced privacy</string>
|
75 | - <!-- Onion location -->
|
|
76 | - <string name="preferences_tor_prioritize_onions">Prioritize .onion sites</string>
|
|
77 | 75 | |
78 | 76 | </resources> |
... | ... | @@ -122,11 +122,6 @@ |
122 | 122 | app:iconSpaceReserved="false"
|
123 | 123 | android:title="@string/preferences_tor_network_settings" />
|
124 | 124 | |
125 | - <SwitchPreference
|
|
126 | - android:key="@string/pref_key_tor_prioritize_onions"
|
|
127 | - app:iconSpaceReserved="false"
|
|
128 | - android:title="@string/preferences_tor_prioritize_onions" />
|
|
129 | - |
|
130 | 125 | <androidx.preference.Preference
|
131 | 126 | android:key="@string/pref_key_tracking_protection_settings"
|
132 | 127 | app:iconSpaceReserved="false"
|