am 60d24e21: Make suggestion text color change based on the item state

Merge commit '60d24e219b1763bc294974e042c67a1a6cadd8d5'

* commit '60d24e219b1763bc294974e042c67a1a6cadd8d5':
  Make suggestion text color change based on the item state
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java
index c1d2ef7..29c65e8 100644
--- a/src/com/android/browser/BrowserProvider.java
+++ b/src/com/android/browser/BrowserProvider.java
@@ -154,10 +154,10 @@
 
     private SearchManager mSearchManager;
 
-    // The hex color string to be applied to urls of website suggestions, as derived from
+    // The ID of the ColorStateList to be applied to urls of website suggestions, as derived from
     // the current theme. This is not set until/unless beautifyUrl is called, at which point
     // this variable caches the color value.
-    private static String mSearchUrlColorHex;
+    private static String mSearchUrlColorId;
 
     public BrowserProvider() {
     }
@@ -613,19 +613,15 @@
          * and adds html formatting to make it green.
          */
         private String beautifyUrl(String url) {
-            if (mSearchUrlColorHex == null) {
+            if (mSearchUrlColorId == null) {
                 // Get the color used for this purpose from the current theme.
                 TypedValue colorValue = new TypedValue();
                 getContext().getTheme().resolveAttribute(
                         com.android.internal.R.attr.textColorSearchUrl, colorValue, true);
-                int color = getContext().getResources().getColor(colorValue.resourceId);
-
-                // Convert the int color value into a hex string, and strip the first two
-                // characters which will be the alpha transparency (html doesn't want this).
-                mSearchUrlColorHex = Integer.toHexString(color).substring(2);
+                mSearchUrlColorId = Integer.toString(colorValue.resourceId);
             }
 
-            return "<font color=\"#" + mSearchUrlColorHex + "\">" + stripUrl(url) + "</font>";
+            return "<font color=\"@" + mSearchUrlColorId + "\">" + stripUrl(url) + "</font>";
         }
     }