diff options
| author | Patrick Scott <phanna@android.com> | 2010-01-08 09:23:44 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-01-08 09:23:44 -0800 |
| commit | 29eadcf376c107afae2a55fcde74d3c484c4fa4f (patch) | |
| tree | c55c73098ce58c93c2b18d316394e1e169d10c82 /core/java/android | |
| parent | 02a018f0b5479ab102f6539bb8bad75c1e935102 (diff) | |
| parent | 6a5b0ecae5dc89a951e1e204bc007f50f944c5d1 (diff) | |
Merge "Deprecate onTooManyRedirects."
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/webkit/CallbackProxy.java | 29 | ||||
| -rw-r--r-- | core/java/android/webkit/WebViewClient.java | 2 |
2 files changed, 5 insertions, 26 deletions
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java index fb369d3bf386..6790c5db21cb 100644 --- a/core/java/android/webkit/CallbackProxy.java +++ b/core/java/android/webkit/CallbackProxy.java @@ -90,7 +90,6 @@ class CallbackProxy extends Handler { private static final int JS_PROMPT = 114; private static final int JS_UNLOAD = 115; private static final int ASYNC_KEYEVENTS = 116; - private static final int TOO_MANY_REDIRECTS = 117; private static final int DOWNLOAD_FILE = 118; private static final int REPORT_ERROR = 119; private static final int RESEND_POST_DATA = 120; @@ -276,19 +275,6 @@ class CallbackProxy extends Handler { } break; - case TOO_MANY_REDIRECTS: - Message cancelMsg = - (Message) msg.getData().getParcelable("cancelMsg"); - Message continueMsg = - (Message) msg.getData().getParcelable("continueMsg"); - if (mWebViewClient != null) { - mWebViewClient.onTooManyRedirects(mWebView, cancelMsg, - continueMsg); - } else { - cancelMsg.sendToTarget(); - } - break; - case REPORT_ERROR: if (mWebViewClient != null) { int reasonCode = msg.arg1; @@ -790,19 +776,10 @@ class CallbackProxy extends Handler { sendMessage(msg); } + // Because this method is public and because CallbackProxy is mistakenly + // party of the public classes, we cannot remove this method. public void onTooManyRedirects(Message cancelMsg, Message continueMsg) { - // Do an unsynchronized quick check to avoid posting if no callback has - // been set. - if (mWebViewClient == null) { - cancelMsg.sendToTarget(); - return; - } - - Message msg = obtainMessage(TOO_MANY_REDIRECTS); - Bundle bundle = msg.getData(); - bundle.putParcelable("cancelMsg", cancelMsg); - bundle.putParcelable("continueMsg", continueMsg); - sendMessage(msg); + // deprecated. } public void onReceivedError(int errorCode, String description, diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java index 032295da5d73..02c721009b10 100644 --- a/core/java/android/webkit/WebViewClient.java +++ b/core/java/android/webkit/WebViewClient.java @@ -86,6 +86,8 @@ public class WebViewClient { * @param view The WebView that is initiating the callback. * @param cancelMsg The message to send if the host wants to cancel * @param continueMsg The message to send if the host wants to continue + * @deprecated This method is no longer called. When the WebView encounters + * a redirect loop, it will cancel the load. */ public void onTooManyRedirects(WebView view, Message cancelMsg, Message continueMsg) { |
