From 746d735d3a18e5a2d99f53399f2b374762e28900 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 18 Sep 2020 22:16:41 +0200 Subject: [PATCH] improve name recognition at receiving calls --- .../kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt index 98da5d04..199953f3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/helpers/CallManager.kt @@ -74,7 +74,7 @@ class CallManager { val privateCursor = context.getMyContactsCursor().loadInBackground() ensureBackgroundThread { 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) { callContact.name = privateContact.name }