From: Soren Stoutner Date: Tue, 11 Jun 2019 00:55:15 +0000 (-0700) Subject: Fix a periodic crash while loading the SSL Certificate Error Dialog. https://redmine... X-Git-Tag: v3.2~16 X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff_plain;h=498e34f7a4548cb791e4dea7e072787ec5943a69 Fix a periodic crash while loading the SSL Certificate Error Dialog. https://redmine.stoutner.com/issues/464 --- diff --git a/app/src/main/java/com/stoutner/privacybrowser/adapters/WebViewPagerAdapter.java b/app/src/main/java/com/stoutner/privacybrowser/adapters/WebViewPagerAdapter.java index 256e6542..da8e6729 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/adapters/WebViewPagerAdapter.java +++ b/app/src/main/java/com/stoutner/privacybrowser/adapters/WebViewPagerAdapter.java @@ -89,6 +89,13 @@ public class WebViewPagerAdapter extends FragmentPagerAdapter { 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; } diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 6500d86b..88f473c8 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -206,7 +206,7 @@ Hata Metni Kaynağı Görüntüle Hakkında 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. + 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. Kısayol oluştur