From 57be86866864e95dce2232957d33a7355edc7f6e Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 25 Jan 2011 01:32:31 +0000 Subject: [PATCH] Added some comments --- src/com/fsck/k9/helper/ContactsSdk3_4.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/com/fsck/k9/helper/ContactsSdk3_4.java b/src/com/fsck/k9/helper/ContactsSdk3_4.java index fd6d23732..af4176907 100644 --- a/src/com/fsck/k9/helper/ContactsSdk3_4.java +++ b/src/com/fsck/k9/helper/ContactsSdk3_4.java @@ -135,21 +135,27 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts final String[] args; if (constraint == null) { - where = null; + where = Contacts.ContactMethods.KIND + " = " + Contacts.KIND_EMAIL; args = null; } else { where = Contacts.ContactMethods.KIND + " = " + Contacts.KIND_EMAIL + - " AND" + "(" + + " AND " + + "(" + + // Match if name starts with "constraint" Contacts.People.NAME + " LIKE ?" + - ") OR (" + + " OR " + + // Match if name contains a word that starts with "constraint" Contacts.People.NAME + " LIKE ?" + - ") OR (" + + " OR " + + // Match if phonetic name starts with "constraint" Contacts.People.PHONETIC_NAME + " LIKE ?" + - ") OR (" + + " OR " + + // Match if phonetic name contains a word that starts with "constraint" Contacts.People.PHONETIC_NAME + " LIKE ?" + - ") OR (" + + " OR " + + // Match if email address starts with "constraint" Contacts.ContactMethods.DATA + " LIKE ?" + ")"; final String filter = constraint.toString() + "%";