]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Fix a periodic crash while loading the SSL Certificate Error Dialog. https://redmine...
authorSoren Stoutner <soren@stoutner.com>
Tue, 11 Jun 2019 00:55:15 +0000 (17:55 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 11 Jun 2019 00:55:15 +0000 (17:55 -0700)
app/src/main/java/com/stoutner/privacybrowser/adapters/WebViewPagerAdapter.java
app/src/main/res/values-tr/strings.xml

index 256e654236d7fe5b0ed7fdb0e7680c9882d0b0bb..da8e6729a74700eacad960ed98df0720afb4565e 100644 (file)
@@ -89,6 +89,13 @@ public class WebViewPagerAdapter extends FragmentPagerAdapter {
             i++;
         }
 
             i++;
         }
 
+        // Set the position to be the last tab if it is not found.
+        // Sometimes there is a race condition in populating the webView fragments list when resuming Privacy Browser and displaying an SSL certificate error while loading a new intent.
+        // In that case, the last tab should be the one it is looking for.
+        if (position == -1) {
+            position = webViewFragmentsList.size() - 1;
+        }
+
         // Return the position.
         return position;
     }
         // Return the position.
         return position;
     }
index 6500d86bde4a4285eb66d706eb8136296afd83ab..88f473c872c9202cfdcc67b58daab7fb6aa39a9c 100644 (file)
     <string name="error_body">Hata Metni</string>
     <string name="about_view_source">Kaynağı Görüntüle Hakkında</string>
     <string name="about_view_source_message">Android WebView kaynak bilgisini gösteremediğinden, bu etkinlikte gösterilen bilgiyi toplamak için sistem araçları kullanılarak ayrı bir istek yapıldı.
     <string name="error_body">Hata Metni</string>
     <string name="about_view_source">Kaynağı Görüntüle Hakkında</string>
     <string name="about_view_source_message">Android WebView kaynak bilgisini gösteremediğinden, bu etkinlikte gösterilen bilgiyi toplamak için sistem araçları kullanılarak ayrı bir istek yapıldı.
-        Elde edilen veri ile ana etkinlikteki WebView'ın kullandığı veri arasında farklılıklar olabilir. Bu sorun, 4.x serisinde Privacy WebView sürümüyle ortadan kalkacaktır.</string>
+        Elde edilen veri ile ana etkinlikteki WebView\'ın kullandığı veri arasında farklılıklar olabilir. Bu sorun, 4.x serisinde Privacy WebView sürümüyle ortadan kalkacaktır.</string>
 
     <!-- Create Home Screen Shortcut Alert Dialog. -->
     <string name="create_shortcut">Kısayol oluştur</string>
 
     <!-- Create Home Screen Shortcut Alert Dialog. -->
     <string name="create_shortcut">Kısayol oluştur</string>