]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Fix a crash when a resource request has a null host and ad blocking is enabled. ...
authorSoren Stoutner <soren@stoutner.com>
Wed, 4 Jan 2017 18:03:34 +0000 (11:03 -0700)
committerSoren Stoutner <soren@stoutner.com>
Wed, 4 Jan 2017 18:03:34 +0000 (11:03 -0700)
app/src/main/assets/de/about_changelog.html
app/src/main/assets/en/about_changelog.html
app/src/main/assets/es/about_changelog.html
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebView.java
app/src/main/res/values-es/strings.xml

index 33920356622cca5c2f1ab3054073d42fa920fef9..54a413c348152c8c1bc94d8231c719ce7498278c 100644 (file)
@@ -33,7 +33,7 @@
 <body>\r
 \r
 <h3>1.14 (version code 16)</h3>\r
-<p>26 December 2016 - minimum API 19, target API 25</p>\r
+<p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=6d3d23ab62cfdd6ef142dbdb764a6bac8fc38ce1">26 December 2016</a> - minimum API 19, target API 25</p>\r
 <ul>\r
     <li>Implement <a href="https://redmine.stoutner.com/issues/31">ad blocking</a>.</li>\r
     <li>Change the default user agent to PrivacyBrowser/1.0 <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=7f0fda47dbd040262a8149e1e6d27f7abe9043ea">for real this time</a>.</li>\r
index 6ab68f3d87c72c44de2f6f98c3c4577929372e20..322f8e00634676a9782269c26ead172724a3ffa9 100644 (file)
@@ -28,7 +28,7 @@
 <body>
 
 <h3>1.14 (version code 16)</h3>
-<p>26 December 2016 - minimum API 19, target API 25</p>
+<p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=6d3d23ab62cfdd6ef142dbdb764a6bac8fc38ce1">26 December 2016</a> - minimum API 19, target API 25</p>
 <ul>
     <li>Implement <a href="https://redmine.stoutner.com/issues/31">ad blocking</a>.</li>
     <li>Change the default user agent to PrivacyBrowser/1.0 <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=7f0fda47dbd040262a8149e1e6d27f7abe9043ea">for real this time</a>.</li>
index 0cd9a8f76fbe07062522e46dbb4b4896b72a32df..a5ac401d651d66c4050c5c3e47065d30b4914758 100644 (file)
@@ -28,7 +28,7 @@
 <body>
 
 <h3>1.14 (c&oacute;digo de versi&oacute;n 16)</h3>
-<p>26 de diciembre de 2016 - API m&iacute;nimo 19, API dirigido 25</p>
+<p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=6d3d23ab62cfdd6ef142dbdb764a6bac8fc38ce1">26 de diciembre de 2016</a> - API m&iacute;nimo 19, API dirigido 25</p>
 <ul>
     <li>Incluir un <a href="https://redmine.stoutner.com/issues/31">bloqueador de anuncios</a>.</li>
     <li>Cambiar el agente de usuario por defecto a PrivacyBrowser/1.0 <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=7f0fda47dbd040262a8149e1e6d27f7abe9043ea">de verdad esta vez</a>.</li>
@@ -36,7 +36,7 @@
     <li>A&ntilde;adir la opci&oacute;n de <a href="https://redmine.stoutner.com/issues/75">habilitar pantalla completa</a> y poner <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=blobdiff;f=app/src/main/res/xml/preferences.xml;h=cdda87e7c2eaa0cabdb6a1a77ffca1124e9423e1;hp=8ed81b84aab687621a0f08921c4f6165392d59d2;hb=743982f883eab347e4029f8a3be760f780b14da1;hpb=7f0fda47dbd040262a8149e1e6d27f7abe9043ea">un defecto de falso</a>.</li>
     <li>Arreglar un error que a veces cambi&oacute; <a href="https://redmine.stoutner.com/issues/74">la barra de navegaci&oacute;n gris en modo de pantalla completa</a> al cambiar entre aplicaciones.</li>
     <li>Aumentar el <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=5c6db7b33577612ff7f120b30fb98cab8afa591f">API dirigido a 25</a>.</li>
-    <li>Actualizar la <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=blobdiff;f=app/src/main/res/values-es/strings.xml;h=83c162b389a075effb68c7ce41cd03482c7c8bce;hp=ff79b6a9f30dbe71a0a076cfcfdc0df834ebb792;hb=2c8e83a7d1a044a5186020ac17d3cefb22b7f330;hpb=e9ed376cc7890f1d1f2e370e2e63f19dcfd1859d">traducci&oacute;n</a> <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=blob;f=app/src/main/assets/es/about_permissions.html;h=eab82ba8ee104e6a71776a557366f70660d28711;hb=2c8e83a7d1a044a5186020ac17d3cefb22b7f330">parcial</a> <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=blobdiff;f=app/src/main/assets/es/about_changelog.html;h=ffb0e4895c0323ae4ee6ca11aab775b318a1b9ef;hp=f810cccc58ee840eb2704bcf81c9e3387d29ff2c;hb=c3ec2515bf9a49d4561efc47f5d21106f15cb286;hpb=2c8e83a7d1a044a5186020ac17d3cefb22b7f330">al espa&ntilde;ol</a>.</li>
+    <li>Actualizar la <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=blobdiff;f=app/src/main/res/values-es/strings.xml;h=83c162b389a075effb68c7ce41cd03482c7c8bce;hp=ff79b6a9f30dbe71a0a076cfcfdc0df834ebb792;hb=2c8e83a7d1a044a5186020ac17d3cefb22b7f330;hpb=e9ed376cc7890f1d1f2e370e2e63f19dcfd1859d">traducci&oacute;n</a> <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=blob;f=app/src/main/assets/es/about_permissions.html;h=eab82ba8ee104e6a71776a557366f70660d28711;hb=2c8e83a7d1a044a5186020ac17d3cefb22b7f330">parcial</a> <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=blobdiff;f=app/src/main/assets/es/about_changelog.html;h=ffb0e4895c0323ae4ee6ca11aab775b318a1b9ef;hp=f810cccc58ee840eb2704bcf81c9e3387d29ff2c;hb=c3ec2515bf9a49d4561efc47f5d21106f15cb286;hpb=2c8e83a7d1a044a5186020ac17d3cefb22b7f330">de espa&ntilde;ol</a>.</li>
 </ul>
 
 <h3>1.13 (c&oacute;digo de versi&oacute;n 15)</h3>
index 000cfad6e5899b85dd7b470fb0409ba94cd8cfab..2e5503b639c752084ff3d11305defe99fd0b1613 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2015-2017 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
@@ -127,7 +127,6 @@ public class MainWebView extends AppCompatActivity implements NavigationView.OnN
     public static SslCertificate sslCertificate;
 
 
-
     // `drawerLayout` is used in `onCreate()`, `onNewIntent()`, and `onBackPressed()`.
     private DrawerLayout drawerLayout;
 
@@ -529,14 +528,16 @@ public class MainWebView extends AppCompatActivity implements NavigationView.OnN
                     // Create a variable to track if this is an ad server.
                     boolean requestHostIsAdServer = false;
 
-                    // Check all the subdomains of `requestHost`.
-                    while (requestHost.contains(".")) {
-                        if (adServersSet.contains(requestHost)) {
-                            requestHostIsAdServer = true;
-                        }
+                    // Check all the subdomains of `requestHost` if it is not null.
+                    if (requestHost != null) {
+                        while (requestHost.contains(".")) {
+                            if (adServersSet.contains(requestHost)) {
+                                requestHostIsAdServer = true;
+                            }
 
-                        // Strip out the lowest subdomain of `requestHost`.
-                        requestHost = requestHost.substring(requestHost.indexOf(".") + 1);
+                            // Strip out the lowest subdomain of `requestHost`.
+                            requestHost = requestHost.substring(requestHost.indexOf(".") + 1);
+                        }
                     }
 
                     if (requestHostIsAdServer) {  // It is an ad server.
@@ -1518,7 +1519,7 @@ public class MainWebView extends AppCompatActivity implements NavigationView.OnN
         String fileName = downloadFileNameEditText.getText().toString();
 
         // Once we have `WRITE_EXTERNAL_STORAGE` permissions we can use `setDestinationInExternalPublicDir`.
-        if (Build.VERSION.SDK_INT >= 23) { // If API >= 23, set the download save in the the `DIRECTORY_DOWNLOADS` using `fileName`.
+        if (Build.VERSION.SDK_INT >= 23) { // If API >= 23, set the download location to `/sdcard/Android/data/com.stoutner.privacybrowser.standard/files` named `fileName`.
             downloadRequest.setDestinationInExternalFilesDir(this, "/", fileName);
         } else { // Only set the title using `fileName`.
             downloadRequest.setTitle(fileName);
index 83c162b389a075effb68c7ce41cd03482c7c8bce..bb0444f590abfa46c8aa411d9f3ba4f09e664517 100644 (file)
@@ -18,8 +18,6 @@
   You should have received a copy of the GNU General Public License
   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
 
-<!-- `tools:ignore="MissingTranslation"` allows release APKs to be built if translation strings are missing.  The missing strings will fall back to English. -->
-
 <resources>
     <!-- Activities. -->
     <string name="privacy_browser">Navegador Privado</string>