Skip to content

Commit

Permalink
dont cancel request if an ad fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Sep 13, 2021
1 parent 4940eae commit f577d56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ private class CustomWebView extends WebViewClient{
public void onReceivedError(WebView view, WebResourceRequest request,
WebResourceError error) {
super.onReceivedError(view, request, error);
closeFragment("404");
if (!request.getUrl().toString().contains("pagead")) {
closeFragment("404");
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,11 @@ public void onReceivedError(WebView view, WebResourceRequest request,
WebResourceError error) {
super.onReceivedError(view, request, error);

mHtmlFromWebView = "404";
synchronized (mutex) {
mutex.notify();
if (!request.getUrl().toString().contains("pagead")) {
mHtmlFromWebView = "404";
synchronized (mutex) {
mutex.notify();
}
}
}

Expand Down

0 comments on commit f577d56

Please sign in to comment.