The query expression used to search for a term prefix is the prefix
itself with a '*' character appended to it. However, if query string
contains trailing space, the query expresssion (e.g. "screen *") doesn't
work. So to fix this issue, the unnecessary trailing space should be
removed.
Bug:
35231587
Test: manual - go to search in Settings and enter "screen "
Change-Id: Ifa5d96f5d38ad5454272f140da440b8ff55d5614
}
private String buildSearchMatchStringForColumns(String query, String[] columnNames) {
- final String value = query + "*";
+ final String value = (query != null ? query.trim() : "") + "*";
StringBuilder sb = new StringBuilder();
final int count = columnNames.length;
for (int n = 0; n < count; n++) {