im trying to verify that the number exists in the contact list, I use the code below, but always get an error in this line
Cursor cur = this.getContentResolver().query(lookupUri,mPhoneNumberProjection, null, null, null);
can someone help me figure out the problem, I gave permission to read my contact in the manifest
public String getContactName(String number)
{
String name = null;
Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
String[] mPhoneNumberProjection = { PhoneLookup._ID, PhoneLookup.NUMBER, PhoneLookup.DISPLAY_NAME };
Cursor cur = this.getContentResolver().query(lookupUri,mPhoneNumberProjection, null, null, null);
try
{
if (cur.moveToFirst())
{
name = cur.getString(cur.getColumnIndex(PhoneLookup.DISPLAY_NAME));
return name;
}
}
finally
{
if (cur != null)
cur.close();
}
return "unknown number";
}
this is my error log! 
source
share