fix crash on android contact weirdness

Fixes #2722
Closes #2758

// FREEBIE
This commit is contained in:
Jake McGinty 2015-03-23 12:32:51 -07:00 committed by Moxie Marlinspike
parent b21369b7bc
commit 9a2c372c23

View File

@ -141,7 +141,7 @@ public class ContactsDatabase {
baseUri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI; baseUri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
} }
Cursor cursor = context.getContentResolver().query(baseUri, ANDROID_PROJECTION, null, null, CONTACT_LIST_SORT); Cursor cursor = context.getContentResolver().query(baseUri, ANDROID_PROJECTION, null, null, CONTACT_LIST_SORT);
return new TypedCursorWrapper(cursor); return cursor == null ? null : new TypedCursorWrapper(cursor);
} }
private Cursor queryLocalDb(String filter) { private Cursor queryLocalDb(String filter) {