diff --git a/app/build.gradle b/app/build.gradle index cab19566..08e791a7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,6 +61,6 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:10c8ac2f1e' + implementation 'com.github.SimpleMobileTools:Simple-Commons:0907d2e57f' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' } diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/services/SimpleCallScreeningService.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/services/SimpleCallScreeningService.kt index 5e3ada92..068249a2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/services/SimpleCallScreeningService.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/services/SimpleCallScreeningService.kt @@ -6,6 +6,7 @@ import android.telecom.Call import android.telecom.CallScreeningService import androidx.annotation.RequiresApi import com.simplemobiletools.commons.extensions.baseConfig +import com.simplemobiletools.commons.extensions.getMyContactsCursor import com.simplemobiletools.commons.helpers.SimpleContactsHelper @RequiresApi(Build.VERSION_CODES.N) @@ -15,7 +16,8 @@ class SimpleCallScreeningService : CallScreeningService() { val simpleContactsHelper = SimpleContactsHelper(this) val number = Uri.decode(callDetails.handle.toString()).substringAfter("tel:") if (baseConfig.blockUnknownNumbers) { - simpleContactsHelper.exists(number) { exists -> + val privateCursor = getMyContactsCursor(false, true) + simpleContactsHelper.exists(number, privateCursor) { exists -> respondToCall(callDetails, !exists) } } else {