mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 06:35:09 +00:00
Do not query for contacts when there are no contacts
This commit is contained in:
@@ -275,6 +275,10 @@ public class ContactsHelper {
|
|||||||
public static Map<uID, Map<String, Object>> getColumnsFromContactsForIDs(Context context, Collection<uID> IDs, String[] contactsProjection) {
|
public static Map<uID, Map<String, Object>> getColumnsFromContactsForIDs(Context context, Collection<uID> IDs, String[] contactsProjection) {
|
||||||
HashMap<uID, Map<String, Object>> toReturn = new HashMap<>();
|
HashMap<uID, Map<String, Object>> toReturn = new HashMap<>();
|
||||||
|
|
||||||
|
if (IDs.isEmpty()) {
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
|
||||||
Uri contactsUri = ContactsContract.Contacts.CONTENT_URI;
|
Uri contactsUri = ContactsContract.Contacts.CONTENT_URI;
|
||||||
|
|
||||||
// Regardless of whether it was requested, we need to look up the uID column
|
// Regardless of whether it was requested, we need to look up the uID column
|
||||||
|
Reference in New Issue
Block a user