Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29eadcf3 authored by Patrick Scott's avatar Patrick Scott Committed by Android (Google) Code Review
Browse files

Merge "Deprecate onTooManyRedirects."

parents 02a018f0 6a5b0eca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -189161,7 +189161,7 @@
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
<parameter name="view" type="android.webkit.WebView">
+3 −26
Original line number Diff line number Diff line
@@ -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,
+2 −0
Original line number Diff line number Diff line
@@ -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) {