mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
improve name recognition at receiving calls
This commit is contained in:
@ -74,7 +74,7 @@ class CallManager {
|
|||||||
val privateCursor = context.getMyContactsCursor().loadInBackground()
|
val privateCursor = context.getMyContactsCursor().loadInBackground()
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
val privateContacts = MyContactsContentProvider.getSimpleContacts(context, privateCursor)
|
val privateContacts = MyContactsContentProvider.getSimpleContacts(context, privateCursor)
|
||||||
val privateContact = privateContacts.firstOrNull { it.phoneNumbers.first() == callContact.number }
|
val privateContact = privateContacts.firstOrNull { it.doesContainPhoneNumber(callContact.number) }
|
||||||
if (privateContact != null) {
|
if (privateContact != null) {
|
||||||
callContact.name = privateContact.name
|
callContact.name = privateContact.name
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user