summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-05-11 16:12:27 -0700
committerJohn Reck <jreck@google.com>2011-05-11 16:14:00 -0700
commit2cb9dc2db14154753d906ff4cce87c333df54214 (patch)
tree15110c416de2a5cf19a8a4c85664d6f0f7936437 /src
parent80b1f82eeb126a8eb5b733ecbd47fd53e17f55d7 (diff)
downloadpackages_apps_browser-2cb9dc2db14154753d906ff4cce87c333df54214.zip
packages_apps_browser-2cb9dc2db14154753d906ff4cce87c333df54214.tar.gz
packages_apps_browser-2cb9dc2db14154753d906ff4cce87c333df54214.tar.bz2
Strip text2_url
Bug: 4387881 Change-Id: I624db23a1181b5f8d8c7fe1a42916f6616655309
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/UrlUtils.java4
-rw-r--r--src/com/android/browser/provider/BrowserProvider2.java3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/browser/UrlUtils.java b/src/com/android/browser/UrlUtils.java
index d6278ca..ccf9710 100644
--- a/src/com/android/browser/UrlUtils.java
+++ b/src/com/android/browser/UrlUtils.java
@@ -16,8 +16,6 @@
package com.android.browser;
-import com.android.browser.homepages.HomeProvider;
-
import android.net.Uri;
import android.util.Patterns;
import android.webkit.URLUtil;
@@ -59,7 +57,7 @@ public class UrlUtils {
* @return a stripped url like "www.google.com", or the original string if it could
* not be stripped
*/
- /* package */ static String stripUrl(String url) {
+ public static String stripUrl(String url) {
if (url == null) return null;
Matcher m = STRIP_URL_PATTERN.matcher(url);
if (m.matches() && m.groupCount() == 3) {
diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java
index 7bb58b4..ebf774e 100644
--- a/src/com/android/browser/provider/BrowserProvider2.java
+++ b/src/com/android/browser/provider/BrowserProvider2.java
@@ -21,6 +21,7 @@ import com.google.common.annotations.VisibleForTesting;
import com.android.browser.BookmarkUtils;
import com.android.browser.BrowserBookmarksPage;
import com.android.browser.R;
+import com.android.browser.UrlUtils;
import com.android.browser.widget.BookmarkThumbnailWidgetProvider;
import com.android.common.content.SyncStateContentProviderHelper;
@@ -1746,7 +1747,7 @@ public class BrowserProvider2 extends SQLiteContentProvider {
case SUGGEST_COLUMN_INTENT_DATA_ID:
case SUGGEST_COLUMN_TEXT_2_TEXT_ID:
case SUGGEST_COLUMN_TEXT_2_URL_ID:
- return mSource.getString(URL_INDEX);
+ return UrlUtils.stripUrl(mSource.getString(URL_INDEX));
case SUGGEST_COLUMN_TEXT_1_ID:
return mSource.getString(TITLE_INDEX);
case SUGGEST_COLUMN_ICON_1_ID: