mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2025-06-05 22:19:12 +02:00
Fix crash for call log item without number
This commit is contained in:
@@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.provider.ContactsContract;
|
||||
import android.text.TextUtils;
|
||||
|
||||
public class ContactsHelper {
|
||||
|
||||
@@ -13,6 +14,8 @@ public class ContactsHelper {
|
||||
};
|
||||
|
||||
public static String getContactName(Context context, String number) {
|
||||
if (TextUtils.isEmpty(number)) return null;
|
||||
|
||||
Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI,
|
||||
Uri.encode(number));
|
||||
|
||||
|
Reference in New Issue
Block a user