Skip to content

Do not query for contacts when there are no contacts

Summary

When there are no contacts getColumnsFromContactsForIDs throws a

android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: SELECT lookup, contact_last_updated_timestamp FROM view_contacts WHERE ((1)) AND ((lookup IN)))

because ((lookup IN))) should be ((lookup IN()))

Since the query is useless anyway just return an empty Map

Test Plan

Pair an android device without any contacts and observe in logcat that the exception is not thrown and that kdeconnectd logs "kdeconnect.plugin.contacts: handleResponseVCards: Got 0 VCards"

Merge request reports