Search in sources :

Example 1 with EmptyCursor

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();
    }
}
Also used : EmptyCursor(com.fsck.k9.helper.EmptyCursor) Uri(android.net.Uri)

Aggregations

Uri (android.net.Uri)1 EmptyCursor (com.fsck.k9.helper.EmptyCursor)1