String where = null;
if (constraint != null) {
String filter = DatabaseUtils.sqlEscapeString(constraint.toString() + '%");
StringBuilder s = new StringBuilder();
s.append("(people.name LIKE ");
s.append(filter);
s.append(") OR (contact_methods.data LIKE ");
s.append(filter);
s.append(")");
where = s.toString();
}
return mContentResolver.query(CONTENT_EMAIL_URI, PROJECTION, where, null, SORT_ORDER);