Fixed bug in friendlyUri function
This commit is contained in:
@@ -123,15 +123,13 @@ object Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun friendlyUri(ctx: Context, uri: String, account: Account, e164Check: Boolean = true): String {
|
fun friendlyUri(ctx: Context, uri: String, account: Account, e164Check: Boolean = true): String {
|
||||||
Log.d(TAG, "******* uri=$uri, country_code=${account.countryCode}, aor=${account.aor}")
|
|
||||||
var u = Contact.contactName(uri)
|
var u = Contact.contactName(uri)
|
||||||
Log.d(TAG, "******* Contact.contactName=$u")
|
|
||||||
if (u != uri)
|
if (u != uri)
|
||||||
return u
|
return u
|
||||||
if (e164Check) {
|
if (e164Check) {
|
||||||
u = Contact.contactName(e164Uri(uri, account.countryCode))
|
val e164Uri = e164Uri(uri, account.countryCode)
|
||||||
Log.d(TAG, "******* Contact.contactName(e164Uri)=$u")
|
u = Contact.contactName(e164Uri)
|
||||||
if (u != uri)
|
if (u != e164Uri)
|
||||||
return u
|
return u
|
||||||
}
|
}
|
||||||
if (u.contains("@")) {
|
if (u.contains("@")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user