|
@@ -1095,22 +1095,31 @@ public class MainActivity extends AppCompatActivity implements RAWebView.WebView
|
|
|
@Override
|
|
@Override
|
|
|
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
|
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
|
|
|
|
|
|
|
- error = true;
|
|
|
|
|
- mEmptyContainer.setVisibility(View.VISIBLE);
|
|
|
|
|
|
|
+ Log.d(TAG, "onReceivedError: " + description);
|
|
|
|
|
+ if (failingUrl.equals(mURL)) {
|
|
|
|
|
+ error = true;
|
|
|
|
|
+ mEmptyContainer.setVisibility(View.VISIBLE);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
|
|
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
|
|
|
|
|
|
|
|
- error = true;
|
|
|
|
|
- mEmptyContainer.setVisibility(View.VISIBLE);
|
|
|
|
|
|
|
+ Log.d(TAG, "onReceivedHttpError: " + errorResponse.getReasonPhrase());
|
|
|
|
|
+ if (request.getUrl().toString().equals(mURL)) {
|
|
|
|
|
+ error = true;
|
|
|
|
|
+ mEmptyContainer.setVisibility(View.VISIBLE);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
|
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
|
|
|
|
|
|
|
- this.error = true;
|
|
|
|
|
- mEmptyContainer.setVisibility(View.VISIBLE);
|
|
|
|
|
|
|
+ Log.d(TAG, "onReceivedSslError: " + error.toString());
|
|
|
|
|
+ if (error.getUrl().equals(mURL)) {
|
|
|
|
|
+ this.error = true;
|
|
|
|
|
+ mEmptyContainer.setVisibility(View.VISIBLE);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// endregion
|
|
// endregion
|