From 226eb739bdd5d1b27feaaf52cb2a206236f1e74e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 31 Oct 2021 08:35:39 +0100 Subject: [PATCH] make custom 'xmpp' protocol in address book case insensitve fixes #4215 --- .../java/eu/siacs/conversations/android/JabberIdContact.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/android/JabberIdContact.java b/src/main/java/eu/siacs/conversations/android/JabberIdContact.java index 0fd46148b..0b701d27a 100644 --- a/src/main/java/eu/siacs/conversations/android/JabberIdContact.java +++ b/src/main/java/eu/siacs/conversations/android/JabberIdContact.java @@ -23,13 +23,13 @@ public class JabberIdContact extends AbstractPhoneContact { ContactsContract.Data.LOOKUP_KEY, ContactsContract.CommonDataKinds.Im.DATA }; - private static final String SELECTION = ContactsContract.Data.MIMETYPE + "=? AND (" + ContactsContract.CommonDataKinds.Im.PROTOCOL + "=? or (" + ContactsContract.CommonDataKinds.Im.PROTOCOL + "=? and " + ContactsContract.CommonDataKinds.Im.CUSTOM_PROTOCOL + "=?))"; + private static final String SELECTION = ContactsContract.Data.MIMETYPE + "=? AND (" + ContactsContract.CommonDataKinds.Im.PROTOCOL + "=? or (" + ContactsContract.CommonDataKinds.Im.PROTOCOL + "=? and lower(" + ContactsContract.CommonDataKinds.Im.CUSTOM_PROTOCOL + ")=?))"; private static final String[] SELECTION_ARGS = { ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE, String.valueOf(ContactsContract.CommonDataKinds.Im.PROTOCOL_JABBER), String.valueOf(ContactsContract.CommonDataKinds.Im.PROTOCOL_CUSTOM), - "XMPP" + "xmpp" }; private final Jid jid;