use of com.fsck.k9.helper.EmptyCursor in project k-9 by k9mail.
the class RecipientLoader method getNicknameCursor.
private Cursor getNicknameCursor(String nickname) {
nickname = "%" + nickname + "%";
Uri queryUriForNickname = ContactsContract.Data.CONTENT_URI;
if (hasContactPermission()) {
return contentResolver.query(queryUriForNickname, PROJECTION_NICKNAME, ContactsContract.CommonDataKinds.Nickname.NAME + " LIKE ? AND " + Data.MIMETYPE + " = ?", new String[] { nickname, ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE }, null);
} else {
return new EmptyCursor();
}
}
Aggregations