Don't strip www from URLs

 Bug: 5253063
 As there is a technical difference between google.com and www.google.com,
 avoid stripping the www. from URLs. Some sites still require the www. to
 be present, and in those cases it leads to a confusing experience if the
 www. is stripped

Change-Id: Iacb5fdb148fc65c1f992339b463264e8cbf100e2
diff --git a/src/com/android/browser/UrlUtils.java b/src/com/android/browser/UrlUtils.java
index 681b242..e24000c 100644
--- a/src/com/android/browser/UrlUtils.java
+++ b/src/com/android/browser/UrlUtils.java
@@ -40,22 +40,22 @@
     private final static String QUICKSEARCH_G = "http://www.google.com/m?q=%s";
     private final static String QUERY_PLACE_HOLDER = "%s";
 
-    // Regular expression to strip http://, optionally www., and optionally
+    // Regular expression to strip http:// and optionally
     // the trailing slash
     private static final Pattern STRIP_URL_PATTERN =
-            Pattern.compile("^http://(?:www\\.)?(.*?)/?$");
+            Pattern.compile("^http://(.*?)/?$");
 
     private UrlUtils() { /* cannot be instantiated */ }
 
     /**
-     * Strips the provided url of preceding "http://", "www.", and any trailing "/". Does not
+     * Strips the provided url of preceding "http://" and any trailing "/". Does not
      * strip "https://". If the provided string cannot be stripped, the original string
      * is returned.
      *
      * TODO: Put this in TextUtils to be used by other packages doing something similar.
      *
      * @param url a url to strip, like "http://www.google.com/"
-     * @return a stripped url like "google.com", or the original string if it could
+     * @return a stripped url like "www.google.com", or the original string if it could
      *         not be stripped
      */
     public static String stripUrl(String url) {