]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/asynctasks/GetHostIpAddresses.java
Track URL loading by tab.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / asynctasks / GetHostIpAddresses.java
index 3c7f37cfbb65bf0086e7a017d3a9a9fe9ee01011..66111de7c351185668e5ffbcc71082beac11f118 100644 (file)
@@ -104,8 +104,8 @@ public class GetHostIpAddresses extends AsyncTask<String, Void, String> {
         // Store the IP addresses.
         nestedScrollWebView.setCurrentIpAddresses(ipAddresses);
 
-        //TODO.  Move `urlIsLoading` to the WebView.
-        if (!MainWebViewActivity.urlIsLoading && !nestedScrollWebView.ignorePinnedDomainInformation() && (nestedScrollWebView.hasPinnedSslCertificate() || nestedScrollWebView.hasPinnedIpAddresses())) {
+        // Checked for pinned mismatches if the WebView is not loading a URL, pinned information is not ignored, and there is pinned information.
+        if ((nestedScrollWebView.getProgress() == 100) && !nestedScrollWebView.ignorePinnedDomainInformation() && (nestedScrollWebView.hasPinnedSslCertificate() || nestedScrollWebView.hasPinnedIpAddresses())) {
             CheckPinnedMismatchHelper.checkPinnedMismatch(fragmentManager, nestedScrollWebView);
         }
     }