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

Commit e1c6c3ae authored by Selim Gurun's avatar Selim Gurun
Browse files

Design a static API for clearclientcertpreferences

Bug: 12983007

Change-Id: I869b4cd4c178b8fedf725f108fd2e369895543e9
parent 201a24f6
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1479,18 +1479,19 @@ public class WebView extends AbsoluteLayout
     * Clears the client certificate preferences table stored in response
     * to proceeding/cancelling client cert requests. Note that webview
     * automatically clears these preferences when it receives a
     * {@link KeyChain.ACTION_STORAGE_CHANGED}
     * {@link KeyChain.ACTION_STORAGE_CHANGED} intent. The client certificate
     * preferences are global for all Webviews.
     *
     * @param resultCallback A callback to be invoked when client certs are cleared.
     *                       The embedder can pass null if not interested in the callback.
     * @param onCleared  A runnable to be invoked when client certs are cleared.
     *                   The embedder can pass null if not interested in the
     *                   callback. The runnable will be called in UI thread.
     *
     * TODO(sgurun) unhide
     * @hide
     */
    public void clearClientCertPreferences(ValueCallback<Void> resultCallback) {
        checkThread();
    public static void clearClientCertPreferences(Runnable onCleared) {
        if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearClientCertPreferences");
        mProvider.clearClientCertPreferences(resultCallback);
        getFactory().getStatics().clearClientCertPreferences(onCleared);
    }

    /**
+7 −0
Original line number Diff line number Diff line
@@ -59,6 +59,13 @@ public interface WebViewFactoryProvider {
         * {@link android.webkit.WebView#setWebContentsDebuggingEnabled(boolean) }
         */
        void setWebContentsDebuggingEnabled(boolean enable);

        /**
         * Implements the API method:
         * {@link android.webkit.WebView#clearClientCertPreferences(Runnable) }
         */
        void clearClientCertPreferences(Runnable onCleared);

    }

    Statics getStatics();
+0 −2
Original line number Diff line number Diff line
@@ -198,8 +198,6 @@ public interface WebViewProvider {

    public void clearSslPreferences();

    public void clearClientCertPreferences(ValueCallback<Void> resultCallback);

    public WebBackForwardList copyBackForwardList();

    public void setFindListener(WebView.FindListener listener);