From 7d132b17c9dd1a816c68bf8505be2028691aaee3 Mon Sep 17 00:00:00 2001 From: John Reck Date: Tue, 26 Oct 2010 15:10:21 -0700 Subject: URL autocomplete shows URL twices Bug: 1377072 For pages that do not have a title, the url autocomplete would show the url twice, once as the title in large font and once as the url below it in a smaller font. This has been fixed to only show the url once as the title, eliminating the url line. Change-Id: I873314fcb8f06322cecf869c79ffece6d4404a03 --- src/com/android/browser/SuggestionsAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/com/android/browser/SuggestionsAdapter.java') diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java index 903768c35..7cfcc6b79 100644 --- a/src/com/android/browser/SuggestionsAdapter.java +++ b/src/com/android/browser/SuggestionsAdapter.java @@ -488,7 +488,9 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable, OnCli * @return the subtitle string to use, or null if none */ private String getUrl(String title, String url) { - if (TextUtils.isEmpty(title) || TextUtils.getTrimmedLength(title) == 0) { + if (TextUtils.isEmpty(title) + || TextUtils.getTrimmedLength(title) == 0 + || title.equals(url)) { return null; } else { return stripUrl(url); -- cgit v1.2.3