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

Commit 0d4fd367 authored by Steve Block's avatar Steve Block Committed by Android (Google) Code Review
Browse files

Merge "Hook up CookieManager.acceptCookie() and setAcceptCookie() for the Chromium HTTP stack"

parents 1396afb7 b5ac9de4
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -273,6 +273,11 @@ public final class CookieManager {
     * @param accept TRUE if accept cookie
     */
    public synchronized void setAcceptCookie(boolean accept) {
        if (useChromiumHttpStack()) {
            nativeSetAcceptCookie(accept);
            return;
        }

        mAcceptCookie = accept;
    }

@@ -281,6 +286,10 @@ public final class CookieManager {
     * @return TRUE if accept cookie
     */
    public synchronized boolean acceptCookie() {
        if (useChromiumHttpStack()) {
            return nativeAcceptCookie();
        }

        return mAcceptCookie;
    }

@@ -1035,5 +1044,7 @@ public final class CookieManager {

    // Native functions
    private static native boolean nativeUseChromiumHttpStack();
    private static native boolean nativeAcceptCookie();
    private static native void nativeRemoveAllCookie();
    private static native void nativeSetAcceptCookie(boolean accept);
}