+ Log_OC.d(TAG, "onPageStarted : " + url);
+ super.onPageStarted(view, url, favicon);
+ }
+
+ @Override
+ public void onFormResubmission (WebView view, Message dontResend, Message resend) {
+ Log_OC.d(TAG, "onFormResubMission ");
+
+ // necessary to grant reload of last page when device orientation is changed after sending a form
+ resend.sendToTarget();
+ }
+
+ @Override
+ public boolean shouldOverrideUrlLoading(WebView view, String url) {
+ return false;
+ }
+
+ @Override
+ public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) {
+ Log_OC.e(TAG, "onReceivedError : " + failingUrl + ", code " + errorCode + ", description: " + description);
+ if (!failingUrl.equals(mLastReloadedUrlAtError)) {
+ view.reload();
+ mLastReloadedUrlAtError = failingUrl;
+ } else {
+ mLastReloadedUrlAtError = null;
+ super.onReceivedError(view, errorCode, description, failingUrl);
+ }
+ }
+
+ @Override
+ public void onPageFinished (WebView view, String url) {
+ Log_OC.d(TAG, "onPageFinished : " + url);
+ mLastReloadedUrlAtError = null;