]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Remove Torch from the list of recommended Tor search engines. Fixes https://redmine...
authorSoren Stoutner <soren@stoutner.com>
Sun, 9 Apr 2017 06:36:11 +0000 (23:36 -0700)
committerSoren Stoutner <soren@stoutner.com>
Sun, 9 Apr 2017 06:36:11 +0000 (23:36 -0700)
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/res/values-es/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values/strings.xml

index 70f8581d98879d80b760b0eb4ee78f7e020381d8..60ff281448bded819d6ae54f51c92b23b3843b02 100644 (file)
@@ -221,9 +221,6 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
     // `translucentNavigationBarOnFullscreen` is used in `onCreate()` and `applyAppSettings()`.
     private boolean translucentNavigationBarOnFullscreen;
 
-    // `proxyThroughOrbot` is used in `onCreate()` and `applyAppSettings()`.
-    private boolean proxyThroughOrbot;
-
     // `currentDomainName` is used in `onCreate(), `onNavigationItemSelected()`, and `applyDomainSettings()`.
     private String currentDomainName;
 
@@ -676,7 +673,7 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
                 }
 
                 // Update `urlTextBox` and apply domain settings if not waiting on Orbot.
-                if (!waitingForOrbot && !url.startsWith("data:text/html,<html><body><br/><center><h1>")) {  // Sometimes `waitingForOrbot` is reset while the Orbot message `onPageFinished()` is running, causing a race condition.  For this reason we check both.
+                if (!waitingForOrbot) {
                     // Check to see if `WebView` has set `url` to be `about:blank`.
                     if (url.equals("about:blank")) {  // `WebView` is blank, so `formattedUrlString` should be `""` and `urlTextBox` should display a hint.
                         // Set `formattedUrlString` to `""`.
@@ -870,9 +867,6 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
         // Initialize `webViewTitle`.
         webViewTitle = getString(R.string.no_title);
 
-        // Apply the app settings from the shared preferences.
-        applyAppSettings();
-
         // Initialize `favoriteIconBitmap`.  We have to use `ContextCompat` until API >= 21.
         Drawable favoriteIconDrawable = ContextCompat.getDrawable(getApplicationContext(), R.drawable.world);
         BitmapDrawable favoriteIconBitmapDrawable = (BitmapDrawable) favoriteIconDrawable;
@@ -883,6 +877,9 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
             favoriteIconBitmap = favoriteIconDefaultBitmap;
         }
 
+        // Apply the app settings from the shared preferences.
+        applyAppSettings();
+
         // Load `formattedUrlString` if we are not waiting for Orbot to connect.
         if (!waitingForOrbot) {
             loadUrl(formattedUrlString);
@@ -1825,7 +1822,7 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
     }
 
     @Override
-    public void onResume() {
+    public void onResume() {  // `onResume()` also runs every time the app starts after `onCreate()` and `onStart()`.
         super.onResume();
 
         // Resume JavaScript (if enabled).
@@ -2137,7 +2134,7 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
         adBlockerEnabled = sharedPreferences.getBoolean("block_ads", true);
         incognitoModeEnabled = sharedPreferences.getBoolean("incognito_mode", false);
         boolean doNotTrackEnabled = sharedPreferences.getBoolean("do_not_track", false);
-        proxyThroughOrbot = sharedPreferences.getBoolean("proxy_through_orbot", false);
+        boolean proxyThroughOrbot = sharedPreferences.getBoolean("proxy_through_orbot", false);
         fullScreenBrowsingModeEnabled = sharedPreferences.getBoolean("enable_full_screen_browsing_mode", false);
         hideSystemBarsOnFullscreen = sharedPreferences.getBoolean("hide_system_bars", false);
         translucentNavigationBarOnFullscreen = sharedPreferences.getBoolean("translucent_navigation_bar", true);
index 1f791f783e74a106c7b10a267ce20da967c23872..03bee80047886ec64f08b55c758bf7f426bc25c5 100644 (file)
         <string name="tor_javascript_disabled_search">Buscar en Tor con Javascript deshabilitado.</string>
         <string-array name="tor_javascript_disabled_search_entries">
             <item>DuckDuckGo</item>
-            <item>Torch</item>
             <item>Personalizado</item>
         </string-array>
         <string name="tor_javascript_disabled_search_custom_url">URL personalizada de búsqueda en Tor con Javascript deshabilitado</string>
         <string name="tor_javascript_enabled_search">Buscar en Tor con JavaScript habilitado</string>
         <string-array name="tor_javascript_enabled_search_entries">
             <item>DuckDuckGo</item>
-            <item>Torch</item>
             <item>Personalizado</item>
         </string-array>
         <string name="tor_javascript_enabled_search_custom_url">URL personalizada de búsqueda en Tor con JavaScript habilitado</string>
index 92e91601fc5ea323cf7413182136fda3a1f5476e..ad63e71e84117600a3039c0474d114f6048c7556 100644 (file)
         <string name="tor_javascript_disabled_search">Tor - Ricerca con JavaScript disabilitato</string>
         <string-array name="tor_javascript_disabled_search_entries">
             <item>DuckDuckGo</item>
-            <item>Torch</item>
             <item>Custom</item>
         </string-array>
         <string name="tor_javascript_disabled_search_custom_url">Tor - Ricerca personalizzata con JavaScript disabilitato</string>
         <string name="tor_javascript_enabled_search">Tor - Ricerca con JavaScript abilitato</string>
         <string-array name="tor_javascript_enabled_search_entries">
             <item>DuckDuckGo</item>
-            <item>Torch</item>
             <item>Custom</item>
         </string-array>
         <string name="tor_javascript_enabled_search_custom_url">Tor - Ricerca personalizzata con JavaScript abilitato</string>
index 7b41f49f81704a6b70adca0c2bfed223f40489fa..0f4d64b33819b714a4c4872f0e7f94327c85a456 100644 (file)
         <string name="tor_javascript_disabled_search">Tor JavaScript-disabled search</string>
         <string-array name="tor_javascript_disabled_search_entries">
             <item>DuckDuckGo</item>
-            <item>Torch</item>
             <item>Custom</item>
         </string-array>
         <string-array name="tor_javascript_disabled_search_entry_values" translatable="false">  <!-- None of the items in this `string-array` should be translated. -->
-            <item>http://3g2upl4pq6kufc4m.onion/html/?q=</item>
-            <item>http://xmh57jrzrnw6insl.onion/4a1f6b371c/search.cgi?q=</item>
+            <item>https://3g2upl4pq6kufc4m.onion/html/?q=</item>
             <item>Custom URL</item><!-- This item must not be translated into other languages because it is referenced in code.  It is never displayed on the screen. -->
         </string-array>
         <string name="tor_javascript_disabled_search_custom_url">Tor JavaScript-disabled search custom URL</string>
         <string name="tor_javascript_enabled_search">Tor JavaScript-enabled search</string>
         <string-array name="tor_javascript_enabled_search_entries">
             <item>DuckDuckGo</item>
-            <item>Torch</item>
             <item>Custom</item>
         </string-array>
         <string-array name="tor_javascript_enabled_search_entry_values" translatable="false">  <!-- None of the items in this `string-array` should be translated. -->
-            <item>http://3g2upl4pq6kufc4m.onion/?q=</item>
-            <item>http://xmh57jrzrnw6insl.onion/4a1f6b371c/search.cgi?q=</item>
+            <item>https://3g2upl4pq6kufc4m.onion/?q=</item>
             <item>Custom URL</item>  <!-- This item must not be translated into other languages because it is referenced in code.  It is never displayed on the screen. -->
         </string-array>
         <string name="tor_javascript_enabled_search_custom_url">Tor JavaScript-enabled search custom URL</string>