Compare the cookie names to ensure a consistent ordering.

Comparing the hash code provided a consistent order but it was not a logical,
testable order as the hash code was not related to lexicographic ordering.

Remove a spurious '=' from a comment.

Bug: 2527671
Change-Id: Ia2248cb8acbc4d5759a624eec13da3837f7406b8
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java
index 427ce76..74a648e 100644
--- a/core/java/android/webkit/CookieManager.java
+++ b/core/java/android/webkit/CookieManager.java
@@ -230,14 +230,8 @@
                 return 1;
             }
 
-            diff = cookie2.name.hashCode() - cookie1.name.hashCode();
-            if (diff != 0) return diff;
-
-            // cookie1 and cookie2 both have non-null values so we emit a
-            // warning and treat them as the same.
-            Log.w(LOGTAG, "Found two cookies with the same value."
-                    + "cookie1=" + cookie1 + " , cookie2=" + cookie2);
-            return 0;
+            // Fallback to comparing the name to ensure consistent order.
+            return cookie1.name.compareTo(cookie2.name);
         }
     }
 
@@ -255,7 +249,7 @@
      * first.
      * 
      * @return CookieManager
-=     */
+     */
     public static synchronized CookieManager getInstance() {
         if (sRef == null) {
             sRef = new CookieManager();