Do not attempt to load native contacts if permission wasn't granted
This commit is contained in:
parent
597a352316
commit
f17b9c6fd1
1 changed files with 1 additions and 1 deletions
|
@ -393,7 +393,7 @@ public class ContactsManager extends ContentObserver implements FriendListListen
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Loader<Cursor> onCreateLoader(int id, @Nullable Bundle args) {
|
public Loader<Cursor> onCreateLoader(int id, @Nullable Bundle args) {
|
||||||
if (id == CONTACTS_LOADER) {
|
if (id == CONTACTS_LOADER && hasContactsAccess()) {
|
||||||
return new CursorLoader(
|
return new CursorLoader(
|
||||||
mActivity,
|
mActivity,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
|
|
Loading…
Reference in a new issue