[tbb-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.0-1] fixup! Add Tor integration and UI
ma1 (@ma1)
git at gitlab.torproject.org
Wed Mar 13 18:04:09 UTC 2024
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
fixup! Add Tor integration and UI
Bug 42444: 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 }
}.apply {
defaultSettings?.let {
this.javascriptEnabled = it.javascriptEnabled
@@ -823,7 +820,6 @@ class GeckoEngine(
this.cookieBannerHandlingDetectOnlyMode = it.cookieBannerHandlingDetectOnlyMode
this.torSecurityLevel = it.torSecurityLevel
this.spoofEnglish = it.spoofEnglish
- this.prioritizeOnions = it.prioritizeOnions
}
}
=====================================
android-components/components/concept/engine/src/main/java/mozilla/components/concept/engine/Settings.kt
=====================================
@@ -213,7 +213,6 @@ abstract class Settings {
open var spoofEnglish: Boolean by UnsupportedSetting()
- open var prioritizeOnions: Boolean by UnsupportedSetting()
}
/**
@@ -258,7 +257,6 @@ data class DefaultSettings(
override var cookieBannerHandlingDetectOnlyMode: Boolean = false,
override var torSecurityLevel: Int = 4,
override var spoofEnglish: Boolean = false,
- override var prioritizeOnions: Boolean = false,
) : Settings()
class UnsupportedSetting<T> {
=====================================
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,
)
GeckoEngine(
=====================================
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
=====================================
@@ -390,6 +390,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,7 +72,5 @@
<!-- 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>
</resources>
=====================================
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/df68d28d7b0d1074ee681588ae51d1be2498308f
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/df68d28d7b0d1074ee681588ae51d1be2498308f
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/20240313/783236fa/attachment-0001.htm>
More information about the tbb-commits
mailing list