diff options
| author | Patrick Scott <phanna@android.com> | 2010-03-08 12:04:08 -0500 |
|---|---|---|
| committer | Patrick Scott <phanna@android.com> | 2010-03-08 12:12:13 -0500 |
| commit | 2807dbd5942a64eb0200de3c2ea0f551a22720f3 (patch) | |
| tree | 05df4aee28f2adab65cc2d77285ad74dd7c1cd07 /core/java/android/webkit/CookieManager.java | |
| parent | bb2bf8fa33cebeb3233afa0e296f3fd93be7c48b (diff) | |
If both cookies have null values, use the name difference.
Change-Id: Idee9763a14dd559f136ee8b1eea9abaf265d15a1
Diffstat (limited to 'core/java/android/webkit/CookieManager.java')
| -rw-r--r-- | core/java/android/webkit/CookieManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java index 379b425dc8b1..427ce76150e8 100644 --- a/core/java/android/webkit/CookieManager.java +++ b/core/java/android/webkit/CookieManager.java @@ -219,7 +219,11 @@ public final class CookieManager { // If cookie2 has a null value, it should come later in // the list. if (cookie2.value == null) { - return -1; + // If both cookies have null values, fall back to using the name + // difference. + if (cookie1.value != null) { + return -1; + } } else if (cookie1.value == null) { // Now we know that cookie2 does not have a null value, if // cookie1 has a null value, place it later in the list. |
