updating commons

This commit is contained in:
tibbi
2022-05-27 18:48:53 +02:00
parent 46ac33b049
commit 8eb20a6dbe
2 changed files with 4 additions and 2 deletions

View File

@ -61,6 +61,6 @@ android {
} }
dependencies { dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:10c8ac2f1e' implementation 'com.github.SimpleMobileTools:Simple-Commons:0907d2e57f'
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
} }

View File

@ -6,6 +6,7 @@ import android.telecom.Call
import android.telecom.CallScreeningService import android.telecom.CallScreeningService
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import com.simplemobiletools.commons.extensions.baseConfig import com.simplemobiletools.commons.extensions.baseConfig
import com.simplemobiletools.commons.extensions.getMyContactsCursor
import com.simplemobiletools.commons.helpers.SimpleContactsHelper import com.simplemobiletools.commons.helpers.SimpleContactsHelper
@RequiresApi(Build.VERSION_CODES.N) @RequiresApi(Build.VERSION_CODES.N)
@ -15,7 +16,8 @@ class SimpleCallScreeningService : CallScreeningService() {
val simpleContactsHelper = SimpleContactsHelper(this) val simpleContactsHelper = SimpleContactsHelper(this)
val number = Uri.decode(callDetails.handle.toString()).substringAfter("tel:") val number = Uri.decode(callDetails.handle.toString()).substringAfter("tel:")
if (baseConfig.blockUnknownNumbers) { if (baseConfig.blockUnknownNumbers) {
simpleContactsHelper.exists(number) { exists -> val privateCursor = getMyContactsCursor(false, true)
simpleContactsHelper.exists(number, privateCursor) { exists ->
respondToCall(callDetails, !exists) respondToCall(callDetails, !exists)
} }
} else { } else {