Do not attempt to load native contacts if permission wasn't granted

This commit is contained in:
Sylvain Berfini 2018-09-19 16:42:16 +02:00
parent 597a352316
commit f17b9c6fd1

View file

@ -393,7 +393,7 @@ public class ContactsManager extends ContentObserver implements FriendListListen
@NonNull
@Override
public Loader<Cursor> onCreateLoader(int id, @Nullable Bundle args) {
if (id == CONTACTS_LOADER) {
if (id == CONTACTS_LOADER && hasContactsAccess()) {
return new CursorLoader(
mActivity,
ContactsContract.Data.CONTENT_URI,