mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Fixed contact lookup if phone number starts by 00 instead of +
This commit is contained in:
parent
a1c73dafe1
commit
bd470b79ef
1 changed files with 3 additions and 2 deletions
|
|
@ -32,6 +32,7 @@ import androidx.annotation.WorkerThread
|
|||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.app.Person
|
||||
import androidx.core.graphics.drawable.IconCompat
|
||||
import androidx.core.text.isDigitsOnly
|
||||
import androidx.loader.app.LoaderManager
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -454,7 +455,7 @@ class ContactsManager
|
|||
sipUri
|
||||
}
|
||||
|
||||
return if (!username.isNullOrEmpty() && username.startsWith("+")) {
|
||||
return if (!username.isNullOrEmpty() && (username.startsWith("+") || username.isDigitsOnly())) {
|
||||
Log.d("$TAG Looking for friend with phone number [$username]")
|
||||
val foundUsingPhoneNumber = coreContext.core.findFriendByPhoneNumber(username)
|
||||
if (foundUsingPhoneNumber != null) {
|
||||
|
|
@ -516,7 +517,7 @@ class ContactsManager
|
|||
model
|
||||
} else {
|
||||
Log.d("$TAG Looking for friend matching SIP URI [$key]")
|
||||
val friend = coreContext.contactsManager.findContactByAddress(clone)
|
||||
val friend = findContactByAddress(clone)
|
||||
if (friend != null) {
|
||||
Log.d("$TAG Matching friend [${friend.name}] found for SIP URI [$key]")
|
||||
val model = ContactAvatarModel(friend, address)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue