[tbb-commits] [tor-browser/tor-browser-68.9.0esr-10.0-1] squash! Bug 28329 - Part 4. Add new Tor Bootstrapping and configuration screens
sysrqb at torproject.org
sysrqb at torproject.org
Fri May 29 20:25:28 UTC 2020
commit 002d35ffa55518c5517c2be746da2678a70da47a
Author: Georg Koppen <gk at torproject.org>
Date: Fri May 8 06:31:09 2020 +0000
squash! Bug 28329 - Part 4. Add new Tor Bootstrapping and configuration screens
Bug 30318: Integrate snowflake into mobile Tor Browser
---
.../res/layout/preference_tor_network_select_bridge_type.xml | 11 +++++++++++
.../java/org/mozilla/gecko/torbootstrap/TorPreferences.java | 7 ++++++-
mobile/android/base/locales/en-US/torbrowser_strings.dtd | 1 +
mobile/android/base/strings.xml.in | 1 +
4 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/mobile/android/app/src/main/res/layout/preference_tor_network_select_bridge_type.xml b/mobile/android/app/src/main/res/layout/preference_tor_network_select_bridge_type.xml
index 4ef5925e233d..6108819430d3 100644
--- a/mobile/android/app/src/main/res/layout/preference_tor_network_select_bridge_type.xml
+++ b/mobile/android/app/src/main/res/layout/preference_tor_network_select_bridge_type.xml
@@ -74,6 +74,17 @@
android:textSize="16sp"
android:text="@string/pref_bridges_type_meek_azure"/>
<include layout="@xml/separator" />
+ <RadioButton android:id="@+id/radio_pref_bridges_snowflake"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10sp"
+ android:layout_marginBottom="10sp"
+ android:buttonTint="@color/tor_bridges_select_builtin"
+ android:fontFamily="Roboto-Regular"
+ android:textColor="#DE000000"
+ android:textSize="16sp"
+ android:text="@string/pref_bridges_type_snowflake"/>
+ <include layout="@xml/separator" />
</RadioGroup>
</LinearLayout>
diff --git a/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java b/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java
index cb37f3867ca4..66473529c069 100644
--- a/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java
+++ b/mobile/android/base/java/org/mozilla/gecko/torbootstrap/TorPreferences.java
@@ -679,6 +679,9 @@ public class TorPreferences extends AppCompatPreferenceActivity {
case "meek":
buttonId = R.id.radio_pref_bridges_meek_azure;
break;
+ case "snowflake":
+ buttonId = R.id.radio_pref_bridges_snowflake;
+ break;
}
if (buttonId != -1) {
@@ -730,11 +733,13 @@ public class TorPreferences extends AppCompatPreferenceActivity {
//
// Similarly, if meek-azure is chosen, substitute it with "meek"
// (tor-android-service only handles these keywords specially if
- // they are less than 5 characters).
+ // they are less than 10 characters).
if (bridgesType.contains("obfs4")) {
bridgesType = "obfs4";
} else if (bridgesType.contains("meek-azure")) {
bridgesType = "meek";
+ } else if (bridgesType.contains("snowflake")) {
+ bridgesType = "snowflake";
}
Preference bridgesTypePref = findPreference(PREFS_BRIDGES_TYPE);
diff --git a/mobile/android/base/locales/en-US/torbrowser_strings.dtd b/mobile/android/base/locales/en-US/torbrowser_strings.dtd
index 8d000f90d561..d4009b272ce9 100644
--- a/mobile/android/base/locales/en-US/torbrowser_strings.dtd
+++ b/mobile/android/base/locales/en-US/torbrowser_strings.dtd
@@ -54,6 +54,7 @@
<!-- When another PT is recommended, change TorNetworkBridgeSelectPreference::saveCurrentCheckedRadioButton(), too -->
<!ENTITY pref_bridges_type_obfs4 "obfs4 (recommended)">
<!ENTITY pref_bridges_type_meek_azure "meek-azure">
+<!ENTITY pref_bridges_type_snowflake "snowflake">
<!ENTITY pref_tor_network_bridges_enabled_change_builtin "You\'re using a built-in bridge to connect to Tor. Change">
<!ENTITY pref_tor_network_bridges_enabled_change_custom "You\'re using a custom bridge to connect to Tor. Change">
<!ENTITY pref_tor_network_using_multiple_provided_bridges "You\'re using multiple custom bridges.">
diff --git a/mobile/android/base/strings.xml.in b/mobile/android/base/strings.xml.in
index 5a6c14bb4331..2dc7c6650880 100644
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -102,6 +102,7 @@
<string name="pref_choice_tor_bridges_enabled_summary">&pref_choice_tor_bridges_enabled_summary;</string>
<string name="pref_bridges_type_obfs4">&pref_bridges_type_obfs4;</string>
<string name="pref_bridges_type_meek_azure">&pref_bridges_type_meek_azure;</string>
+ <string name="pref_bridges_type_snowflake">&pref_bridges_type_snowflake;</string>
<string name="pref_tor_bridges_provide_manual_button_title">&pref_tor_bridges_provide_manual_button_title;</string>
<string name="pref_tor_bridges_provide_select_text_title">&pref_tor_bridges_provide_select_text_title;</string>
More information about the tbb-commits
mailing list