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

Commit 9a0cd15e authored by Steve Block's avatar Steve Block
Browse files

Always update the WebView's SSL certificate, regardless of whether a WebViewClient has been set

This looks like a copy-paste error from other CallbackProxy methods which call
back to the WebViewClient or WebChromeClient, rather than the WebView.

Also remove '@hide' annotations. These are superfluous as the class is not
public.

Bug: 5287216
Change-Id: If97c4d769cf82563b9c182ba09fc742fbb7e08e9
parent 200ff0a7
Loading
Loading
Loading
Loading
+1 −18
Original line number Diff line number Diff line
@@ -165,8 +165,6 @@ class CallbackProxy extends Handler {
    /**
     * Get the WebViewClient.
     * @return the current WebViewClient instance.
     *
     *@hide pending API council approval.
     */
    public WebViewClient getWebViewClient() {
       return mWebViewClient;
@@ -1013,10 +1011,6 @@ class CallbackProxy extends Handler {
        sendMessage(msg);
    }

    /**
     * @hide - hide this because it contains a parameter of type SslError.
     * SslError is located in a hidden package.
     */
    public void onReceivedSslError(SslErrorHandler handler, SslError error) {
        // Do an unsynchronized quick check to avoid posting if no callback has
        // been set.
@@ -1031,9 +1025,7 @@ class CallbackProxy extends Handler {
        msg.obj = map;
        sendMessage(msg);
    }
    /**
     * @hide
     */

    public void onReceivedClientCertRequest(ClientCertRequestHandler handler, String host_and_port) {
        // Do an unsynchronized quick check to avoid posting if no callback has
        // been set.
@@ -1048,17 +1040,8 @@ class CallbackProxy extends Handler {
        msg.obj = map;
        sendMessage(msg);
    }
    /**
     * @hide - hide this because it contains a parameter of type SslCertificate,
     * which is located in a hidden package.
     */

    public void onReceivedCertificate(SslCertificate certificate) {
        // Do an unsynchronized quick check to avoid posting if no callback has
        // been set.
        if (mWebViewClient == null) {
            return;
        }
        // here, certificate can be null (if the site is not secure)
        sendMessage(obtainMessage(RECEIVED_CERTIFICATE, certificate));
    }