mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
updating commons
This commit is contained in:
@ -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'
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user