Improved finding of tel URI's contact
This commit is contained in:
@ -76,9 +76,10 @@ sealed class Contact {
|
|||||||
fun contactName(uri: String): String {
|
fun contactName(uri: String): String {
|
||||||
var contact = findContact(uri)
|
var contact = findContact(uri)
|
||||||
if (contact == null) {
|
if (contact == null) {
|
||||||
val userPart = Utils.uriUserPart(uri)
|
val userPart = Utils.uriUserPart(uri).replace("%23", "#")
|
||||||
if (Utils.isTelNumber(userPart))
|
if (Utils.isTelNumber(userPart)) {
|
||||||
contact = findContact("tel:$userPart")
|
contact = findContact("tel:$userPart")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (contact != null)
|
if (contact != null)
|
||||||
return contact.name()
|
return contact.name()
|
||||||
|
|||||||
Reference in New Issue
Block a user