Only search for visible parts of a contact.
This commit is contained in:
parent
358d6333c3
commit
e0502c24e1
1 changed files with 15 additions and 16 deletions
|
@ -1281,7 +1281,7 @@ public class RecipientDatabase extends Database {
|
|||
String selection = BLOCKED + " = ? AND " +
|
||||
REGISTERED + " = ? AND " +
|
||||
GROUP_ID + " IS NULL AND " +
|
||||
"(" + SYSTEM_DISPLAY_NAME + " NOT NULL OR " + SEARCH_PROFILE_NAME + " NOT NULL OR " + USERNAME + " NOT NULL)";
|
||||
"(" + SORT_NAME + " NOT NULL OR " + USERNAME + " NOT NULL)";
|
||||
String[] args = new String[] { "0", String.valueOf(RegisteredState.REGISTERED.getId()) };
|
||||
String orderBy = SORT_NAME + ", " + SYSTEM_DISPLAY_NAME + ", " + SEARCH_PROFILE_NAME + ", " + USERNAME + ", " + PHONE;
|
||||
|
||||
|
@ -1297,11 +1297,10 @@ public class RecipientDatabase extends Database {
|
|||
GROUP_ID + " IS NULL AND " +
|
||||
"(" +
|
||||
PHONE + " LIKE ? OR " +
|
||||
SYSTEM_DISPLAY_NAME + " LIKE ? OR " +
|
||||
SEARCH_PROFILE_NAME + " LIKE ? OR " +
|
||||
SORT_NAME + " LIKE ? OR " +
|
||||
USERNAME + " LIKE ?" +
|
||||
")";
|
||||
String[] args = new String[] { "0", String.valueOf(RegisteredState.REGISTERED.getId()), query, query, query, query };
|
||||
String[] args = new String[] { "0", String.valueOf(RegisteredState.REGISTERED.getId()), query, query, query };
|
||||
String orderBy = SORT_NAME + ", " + SYSTEM_DISPLAY_NAME + ", " + SEARCH_PROFILE_NAME + ", " + PHONE;
|
||||
|
||||
return databaseHelper.getReadableDatabase().query(TABLE_NAME, SEARCH_PROJECTION, selection, args, null, null, orderBy);
|
||||
|
@ -1345,8 +1344,8 @@ public class RecipientDatabase extends Database {
|
|||
|
||||
String selection = BLOCKED + " = ? AND " +
|
||||
"(" +
|
||||
SYSTEM_DISPLAY_NAME + " LIKE ? OR " +
|
||||
SEARCH_PROFILE_NAME + " LIKE ? OR " +
|
||||
SORT_NAME + " LIKE ? OR " +
|
||||
USERNAME + " LIKE ? OR " +
|
||||
PHONE + " LIKE ? OR " +
|
||||
EMAIL + " LIKE ?" +
|
||||
")";
|
||||
|
|
Loading…
Add table
Reference in a new issue