summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2010-10-26 15:10:21 -0700
committerJohn Reck <jreck@google.com>2010-10-26 15:10:21 -0700
commit7d132b17c9dd1a816c68bf8505be2028691aaee3 (patch)
tree672d8f6c35f3966d6a612af9fce8303de9a2cb41
parentd8657622ef6474677d8c1294627d5423723cc867 (diff)
downloadpackages_apps_browser-7d132b17c9dd1a816c68bf8505be2028691aaee3.zip
packages_apps_browser-7d132b17c9dd1a816c68bf8505be2028691aaee3.tar.gz
packages_apps_browser-7d132b17c9dd1a816c68bf8505be2028691aaee3.tar.bz2
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
-rw-r--r--src/com/android/browser/SuggestionsAdapter.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java
index 903768c..7cfcc6b 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);