X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fasynctasks%2FGetHostIpAddresses.java;h=050ae1dd502437c302383e2b86c5079c6419751a;hp=3c7f37cfbb65bf0086e7a017d3a9a9fe9ee01011;hb=e7380180e2936dc8ebafaae1999a4b6789309c13;hpb=9d5e4c56326502b6b74e8f3e463275f5c1e176cc diff --git a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/GetHostIpAddresses.java b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/GetHostIpAddresses.java index 3c7f37cf..050ae1dd 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/GetHostIpAddresses.java +++ b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/GetHostIpAddresses.java @@ -24,7 +24,6 @@ import android.os.AsyncTask; import androidx.fragment.app.FragmentManager; -import com.stoutner.privacybrowser.activities.MainWebViewActivity; import com.stoutner.privacybrowser.helpers.CheckPinnedMismatchHelper; import com.stoutner.privacybrowser.views.NestedScrollWebView; @@ -104,8 +103,8 @@ public class GetHostIpAddresses extends AsyncTask { // 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); } }