diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java index 20230e770bf5b..0427d10519190 100644 --- a/core/java/android/webkit/CookieManager.java +++ b/core/java/android/webkit/CookieManager.java @@ -103,15 +103,22 @@ public abstract class CookieManager { * will be ignored if it is expired. To set multiple cookies, your application should invoke * this method multiple times. * - *
The {@code value} parameter must follow the format of the {@code Set-Cookie} HTTP - * response header defined by - * RFC6265bis. - * This is a key-value pair of the form {@code "key=value"}, optionally followed by a list of - * cookie attributes delimited with semicolons (ex. {@code "key=value; Max-Age=123"}). Please - * consult the RFC specification for a list of valid attributes. + *
The {@code value} parameter must follow the format of the {@code Set-Cookie} HTTP response + * header. This is a key-value pair of the form {@code "key=value"}, optionally followed by a + * list of cookie attributes delimited with semicolons (ex. {@code "key=value; Max-Age=123"}). + * For the header format and attributes supported by WebView, see the {@code Set-Cookie} + * documentation on MDN. * - *
Note: if specifying a {@code value} containing the {@code "Secure"} - * attribute, {@code url} must use the {@code "https://"} scheme. + *
+ * Notes: + *
The {@code value} parameter must follow the format of the {@code Set-Cookie} HTTP - * response header defined by - * RFC6265bis. - * This is a key-value pair of the form {@code "key=value"}, optionally followed by a list of - * cookie attributes delimited with semicolons (ex. {@code "key=value; Max-Age=123"}). Please - * consult the RFC specification for a list of valid attributes. + *
The {@code value} parameter must follow the format of the {@code Set-Cookie} HTTP response + * header. This is a key-value pair of the form {@code "key=value"}, optionally followed by a + * list of cookie attributes delimited with semicolons (ex. {@code "key=value; Max-Age=123"}). + * For the header format and attributes supported by WebView, see the {@code Set-Cookie} + * documentation on MDN. * *
This method is asynchronous. If a {@link ValueCallback} is provided, * {@link ValueCallback#onReceiveValue} will be called on the current @@ -140,8 +147,15 @@ public abstract class CookieManager { * completes or whether it succeeded, and in this case it is safe to call the method from a * thread without a Looper. * - *
Note: if specifying a {@code value} containing the {@code "Secure"} - * attribute, {@code url} must use the {@code "https://"} scheme. + *
+ * Notes: + *
+ * Note: Any cookies set with the {@code "Partitioned"} attribute will only be returned + * for the top-level partition of {@code url}. + * * @param url the URL for which the cookies are requested * @return value the cookies as a string, using the format of the 'Cookie' * HTTP request header