diff options
Diffstat (limited to 'java/com/android/dialer/contactsfragment/ContactsFragment.java')
-rw-r--r-- | java/com/android/dialer/contactsfragment/ContactsFragment.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/com/android/dialer/contactsfragment/ContactsFragment.java b/java/com/android/dialer/contactsfragment/ContactsFragment.java index 18220601f..ea662fc89 100644 --- a/java/com/android/dialer/contactsfragment/ContactsFragment.java +++ b/java/com/android/dialer/contactsfragment/ContactsFragment.java @@ -29,6 +29,7 @@ import android.view.View; import android.view.View.OnScrollChangeListener; import android.view.ViewGroup; import android.widget.TextView; +import com.android.dialer.util.PermissionsUtil; /** Fragment containing a list of all contacts. */ public class ContactsFragment extends Fragment @@ -52,6 +53,11 @@ public class ContactsFragment extends Fragment recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view); recyclerView.setLayoutManager(manager); getLoaderManager().initLoader(0, null, this); + + if (PermissionsUtil.hasContactsReadPermissions(getContext())) { + getLoaderManager().initLoader(0, null, this); + } + return view; } |