网页加载错误显示错误网址问题

This commit is contained in:
18401019693 2022-11-17 11:48:01 +08:00
parent 267d07f3a5
commit 99b9af2980
2 changed files with 8 additions and 4 deletions

View File

@ -152,8 +152,10 @@ public class ZhuangBanActivity extends AbsActivity {
// 这个方法在6.0才出现
int statusCode = errorResponse.getStatusCode();
if (404 == statusCode || 500 == statusCode) {
htmlError.setVisibility(View.VISIBLE);
htmlError.setText("errorCode:" + statusCode +"\n failingUrl:" + request.getUrl());
if ( !request.getUrl().toString().contains("favicon.png")){
htmlError.setVisibility(View.VISIBLE);
htmlError.setText("errorCode:" + statusCode +"\n failingUrl:" + request.getUrl());
}
}
}
});

View File

@ -209,8 +209,10 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
// 这个方法在6.0才出现
int statusCode = errorResponse.getStatusCode();
if (404 == statusCode || 500 == statusCode) {
htmlError.setVisibility(View.VISIBLE);
htmlError.setText("errorCode:" + statusCode +"\n failingUrl:" + request.getUrl());
if ( !request.getUrl().toString().contains("favicon.png")){
htmlError.setVisibility(View.VISIBLE);
htmlError.setText("errorCode:" + statusCode +"\n failingUrl:" + request.getUrl());
}
}
}
});