Small improvements

This commit is contained in:
M66B
2023-12-06 17:06:46 +01:00
parent 4d86ea2b2c
commit 757181958b
23 changed files with 134 additions and 137 deletions

View File

@@ -1209,9 +1209,12 @@ public class MessageHelper {
ContactsContract.CommonDataKinds.Website.TYPE,
ContactsContract.CommonDataKinds.Website.URL
},
ContactsContract.Data.CONTACT_ID + " = " + contactId +
" AND " + ContactsContract.Contacts.Data.MIMETYPE + " = '" + ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE + "'",
null, null)) {
ContactsContract.Data.CONTACT_ID + " = ?" +
" AND " + ContactsContract.Contacts.Data.MIMETYPE + " = ?",
new String[]{
contactId,
ContactsContract.CommonDataKinds.Website.CONTENT_ITEM_TYPE
}, null)) {
while (web.moveToNext()) {
int type = web.getInt(0);
String url = web.getString(1);
@@ -1226,8 +1229,10 @@ public class MessageHelper {
ContactsContract.CommonDataKinds.Phone.TYPE,
ContactsContract.CommonDataKinds.Phone.NUMBER
},
ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = " + contactId,
null, null)) {
ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?",
new String[]{
contactId
}, null)) {
while (phones.moveToNext()) {
int type = phones.getInt(0);
String number = phones.getString(1);