Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
In Email-lookup query, prefer visible over invisible contacts
Browse files Browse the repository at this point in the history
Bug:5578303
Change-Id: I29beb8ce7ab0745b9f57b399fe017d60fbb96285
  • Loading branch information
Daniel Lehmann committed Nov 8, 2011
1 parent 58795e4 commit 071d0e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/com/android/providers/contacts/ContactsProvider2.java
Expand Up @@ -5552,6 +5552,11 @@ protected Cursor queryLocal(Uri uri, String[] projection, String selection,
selectionArgs = insertSelectionArg(selectionArgs, address);
qb.appendWhere(" AND UPPER(" + Email.DATA + ")=UPPER(?)");
}
// unless told otherwise, we'll return visible before invisible contacts
if (sortOrder == null) {
sortOrder = "(" + RawContacts.CONTACT_ID + " IN " +
Tables.DEFAULT_DIRECTORY + ") DESC";
}
break;
}

Expand Down

0 comments on commit 071d0e7

Please sign in to comment.