Tor settings: Address review comments

This commit is contained in:
Torsten Grote
2018-08-16 12:27:26 -03:00
parent 9b17836595
commit 4b9a9771f8
3 changed files with 3 additions and 5 deletions

View File

@@ -649,7 +649,7 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
enableNetwork(false); enableNetwork(false);
} else if (network == PREF_TOR_NETWORK_NEVER || } else if (network == PREF_TOR_NETWORK_NEVER ||
(!useMobile && !wifi)) { (!useMobile && !wifi)) {
LOG.info("Disabling network due to data setting"); LOG.info("Disabling network due to setting");
enableNetwork(false); enableNetwork(false);
} else if (automatic && blocked && !bridgesWork) { } else if (automatic && blocked && !bridgesWork) {
LOG.info("Disabling network, country is blocked"); LOG.info("Disabling network, country is blocked");

View File

@@ -314,7 +314,7 @@ public class SettingsFragment extends PreferenceFragmentCompat
// Look up country name in the user's chosen language if available // Look up country name in the user's chosen language if available
String country = locationUtils.getCurrentCountry(); String country = locationUtils.getCurrentCountry();
String countryName = getString(R.string.tor_network_country_unknown); String countryName = country;
for (Locale locale : Locale.getAvailableLocales()) { for (Locale locale : Locale.getAvailableLocales()) {
if (locale.getCountry().equalsIgnoreCase(country)) { if (locale.getCountry().equalsIgnoreCase(country)) {
countryName = locale.getDisplayCountry(); countryName = locale.getDisplayCountry();

View File

@@ -355,9 +355,7 @@
<string name="tor_network_setting_never">Don\'t connect</string> <string name="tor_network_setting_never">Don\'t connect</string>
<!-- How and when Tor will connect after Automatic: E.g. Don't connect (in China) or Use Tor with bridges (in Belarus) --> <!-- How and when Tor will connect after Automatic: E.g. Don't connect (in China) or Use Tor with bridges (in Belarus) -->
<string name="tor_network_setting_summary">Automatic: %1$s (in %2$s)</string> <string name="tor_network_setting_summary">Automatic: %1$s (in %2$s)</string>
<!-- The placeholder when we don't know the user's current country --> <string name="tor_mobile_data_title">Use mobile data</string>
<string name="tor_network_country_unknown">unknown</string>
<string name="tor_mobile_data_title">Use Mobile Data</string>
<!-- Settings Security and Panic --> <!-- Settings Security and Panic -->
<string name="security_settings_title">Security</string> <string name="security_settings_title">Security</string>