Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

In Email-lookup query, prefer visible over invisible contacts

Bug:5578303
Change-Id: I29beb8ce7ab0745b9f57b399fe017d60fbb96285
  • Loading branch information...
commit 071d0e7bd3b2f3c9628dd655b09d147e668c3931 1 parent 58795e4
Daniel Lehmann authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/com/android/providers/contacts/ContactsProvider2.java
View
5 src/com/android/providers/contacts/ContactsProvider2.java
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.