mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-02 14:02:17 -05:00
Match beginning of words when searching for contacts in Android 1.5/1.6 (e.g. "Doe" will find "Doe, John" and "John Doe")
Fixes issue 1354
This commit is contained in:
parent
0add1f97c0
commit
7f396e29a0
@ -145,10 +145,13 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts
|
|||||||
" AND" + "(" +
|
" AND" + "(" +
|
||||||
Contacts.People.NAME + " LIKE ?" +
|
Contacts.People.NAME + " LIKE ?" +
|
||||||
") OR (" +
|
") OR (" +
|
||||||
|
Contacts.People.NAME + " LIKE ?" +
|
||||||
|
") OR (" +
|
||||||
Contacts.ContactMethods.DATA + " LIKE ?" +
|
Contacts.ContactMethods.DATA + " LIKE ?" +
|
||||||
")";
|
")";
|
||||||
final String filter = constraint.toString() + "%";
|
final String filter = constraint.toString() + "%";
|
||||||
args = new String[] {filter, filter};
|
final String filter2 = "% " + filter;
|
||||||
|
args = new String[] {filter, filter2, filter};
|
||||||
}
|
}
|
||||||
|
|
||||||
final Cursor c = mContentResolver.query(
|
final Cursor c = mContentResolver.query(
|
||||||
|
Loading…
Reference in New Issue
Block a user