ma1 pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android
Commits: 2bc609e5 by hackademix at 2024-03-12T10:34:19+01:00 fixup! Add Tor integration and UI
Bug 42440: Remove the "Prioritize .onion sites when known" option
- - - - -
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:
===================================== android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt ===================================== @@ -796,9 +796,6 @@ class GeckoEngine( localeUpdater.updateValue() } } - override var prioritizeOnions: Boolean - get() = runtime.settings.prioritizeOnions - set(value) { runtime.settings.prioritizeOnions = value } override var useNewBootstrap: Boolean get() = runtime.settings.useNewBootstrap set(value) { @@ -828,7 +825,6 @@ class GeckoEngine( this.cookieBannerHandlingDetectOnlyMode = it.cookieBannerHandlingDetectOnlyMode this.torSecurityLevel = it.torSecurityLevel this.spoofEnglish = it.spoofEnglish - this.prioritizeOnions = it.prioritizeOnions this.useNewBootstrap = it.useNewBootstrap } }
===================================== android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt ===================================== @@ -213,8 +213,6 @@ abstract class Settings {
open var spoofEnglish: Boolean by UnsupportedSetting()
- open var prioritizeOnions: Boolean by UnsupportedSetting() - open var useNewBootstrap: Boolean by UnsupportedSetting() }
@@ -260,7 +258,6 @@ data class DefaultSettings( override var cookieBannerHandlingDetectOnlyMode: Boolean = false, override var torSecurityLevel: Int = 4, override var spoofEnglish: Boolean = false, - override var prioritizeOnions: Boolean = false, override var useNewBootstrap: Boolean = false, ) : Settings()
===================================== fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt ===================================== @@ -145,7 +145,6 @@ class Core( .shouldShowCookieBannerReEngagementDialog(), torSecurityLevel = context.settings().torSecurityLevel().intRepresentation, spoofEnglish = context.settings().spoofEnglish, - prioritizeOnions = context.settings().prioritizeOnions, useNewBootstrap = context.settings().useNewBootstrap, )
===================================== fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt ===================================== @@ -462,10 +462,8 @@ class SettingsFragment : PreferenceFragmentCompat() { }
private fun setupPreferences() { - val prioritizeOnionsKey = getPreferenceKey(R.string.pref_key_tor_prioritize_onions) val leakKey = getPreferenceKey(R.string.pref_key_leakcanary) val debuggingKey = getPreferenceKey(R.string.pref_key_remote_debugging) - val preferencePrioritizeOnions = findPreference<Preference>(prioritizeOnionsKey) val preferenceLeakCanary = findPreference<Preference>(leakKey) val preferenceRemoteDebugging = findPreference<Preference>(debuggingKey) val preferenceMakeDefaultBrowser = @@ -484,13 +482,6 @@ class SettingsFragment : PreferenceFragmentCompat() { } }
- preferencePrioritizeOnions?.setOnPreferenceChangeListener<Boolean> { preference, newValue -> - preference.context.settings().preferences.edit() - .putBoolean(preference.key, newValue).apply() - requireComponents.core.engine.settings.prioritizeOnions = newValue - true - } - if (!Config.channel.isReleased) { preferenceLeakCanary?.setOnPreferenceChangeListener { _, newValue -> val isEnabled = newValue == true
===================================== fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt ===================================== @@ -335,11 +335,6 @@ class Settings(private val appContext: Context) : PreferencesHolder { default = false )
- var prioritizeOnions by booleanPreference( - appContext.getPreferenceKey(R.string.pref_key_tor_prioritize_onions), - default = false - ) - var defaultSearchEngineName by stringPreference( appContext.getPreferenceKey(R.string.pref_key_search_engine), default = "",
===================================== fenix/app/src/main/res/values/preference_keys.xml ===================================== @@ -393,6 +393,4 @@ <string name="pref_key_tor_network_settings_bridges_enabled">pref_key_tor_network_settings_bridges_enabled</string>
<string name="pref_key_spoof_english" translatable="false">pref_key_spoof_english</string> - - <string name="pref_key_tor_prioritize_onions" translatable="false">pref_key_tor_prioritize_onions</string> </resources>
===================================== fenix/app/src/main/res/values/torbrowser_strings.xml ===================================== @@ -72,8 +72,6 @@
<!-- Spoof locale to English --> <string name="tor_spoof_english">Request English versions of web pages for enhanced privacy</string> - <!-- Onion location --> - <string name="preferences_tor_prioritize_onions">Prioritize .onion sites</string>
<!-- Connection assist. --> <string name="connection_assist_tor_connect_title">Connect to Tor</string>
===================================== fenix/app/src/main/res/xml/preferences.xml ===================================== @@ -122,11 +122,6 @@ app:iconSpaceReserved="false" android:title="@string/preferences_tor_network_settings" />
- <SwitchPreference - android:key="@string/pref_key_tor_prioritize_onions" - app:iconSpaceReserved="false" - android:title="@string/preferences_tor_prioritize_onions" /> - <androidx.preference.Preference android:key="@string/pref_key_tracking_protection_settings" app:iconSpaceReserved="false"
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/2bc6...
tbb-commits@lists.torproject.org