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

Commit 557092f2 authored by Iain Merrick's avatar Iain Merrick Committed by Android (Google) Code Review
Browse files

Merge "Add FlushCookieStore() method to CookieManager (Java side)"

parents e41bb535 c40fc2c3
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -620,6 +620,20 @@ public final class CookieManager {
        new Thread(clearCache).start();
    }

    /**
     * Tell the cookie store that this is a good time to flush cookies to flash.
     *
     * This should be called when the app is paused. Note that this method only
     * acts as a hint, and may not have any effect. Flushing is asynchronous.
     *
     * @hide pending API council approval.
     */
    public void flushCookieStore() {
        if (useChromiumHttpStack()) {
            nativeFlushCookieStore();
        }
    }

    /**
     * Package level api, called from CookieSyncManager
     *
@@ -1078,4 +1092,5 @@ public final class CookieManager {
    private static native void nativeRemoveSessionCookie();
    private static native void nativeSetAcceptCookie(boolean accept);
    private static native void nativeSetCookie(String url, String value);
    private static native void nativeFlushCookieStore();
}