When searching the browser history, search titles.
Copy of change https://android-git.corp.google.com/g/Gerrit#change,2450
into donut.
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java
index bc73ab6..c97c057 100644
--- a/src/com/android/browser/BrowserProvider.java
+++ b/src/com/android/browser/BrowserProvider.java
@@ -68,8 +68,9 @@
"_id", "url", "title", "bookmark"
};
private static final String SUGGEST_SELECTION =
- "url LIKE ? OR url LIKE ? OR url LIKE ? OR url LIKE ?";
- private String[] SUGGEST_ARGS = new String[4];
+ "url LIKE ? OR url LIKE ? OR url LIKE ? OR url LIKE ?"
+ + " OR title LIKE ?";
+ private String[] SUGGEST_ARGS = new String[5];
// shared suggestion array index, make sure to match COLUMNS
private static final int SUGGEST_COLUMN_INTENT_ACTION_ID = 1;
@@ -641,6 +642,8 @@
SUGGEST_ARGS[1] = "http://www." + like;
SUGGEST_ARGS[2] = "https://" + like;
SUGGEST_ARGS[3] = "https://www." + like;
+ // To match against titles.
+ SUGGEST_ARGS[4] = like;
myArgs = SUGGEST_ARGS;
suggestSelection = SUGGEST_SELECTION;
}