Use linphone_core_find_friend_by_phone_number

This commit is contained in:
Sylvain Berfini 2020-07-06 10:28:13 +02:00
parent adffb08cd0
commit 704df9d583

View file

@ -200,9 +200,8 @@ class ContactsManager(private val context: Context) {
@Synchronized
fun findContactByPhoneNumber(number: String): Contact? {
return contacts.find { contact ->
contact.phoneNumbers.contains(number)
}
val friend: Friend? = coreContext.core.findFriendByPhoneNumber(number)
return friend?.userData as? Contact
}
@Synchronized