2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Do not query for contacts when there are no contacts

This commit is contained in:
Erik Duisters
2019-01-27 17:33:27 +01:00
parent f4c80dd839
commit da9b4ea19e

View File

@@ -275,6 +275,10 @@ public class ContactsHelper {
public static Map<uID, Map<String, Object>> getColumnsFromContactsForIDs(Context context, Collection<uID> IDs, String[] contactsProjection) {
HashMap<uID, Map<String, Object>> toReturn = new HashMap<>();
if (IDs.isEmpty()) {
return toReturn;
}
Uri contactsUri = ContactsContract.Contacts.CONTENT_URI;
// Regardless of whether it was requested, we need to look up the uID column