make some safety checks nicer

This commit is contained in:
tibbi 2021-10-08 19:53:00 +02:00
parent 4ac11f6a42
commit dc79228bc1
2 changed files with 1 additions and 7 deletions

View File

@ -55,6 +55,6 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:d7c3f6de22'
implementation 'com.github.SimpleMobileTools:Simple-Commons:8663595392'
implementation 'com.github.tibbi:IndicatorFastScroll:c3de1d040a'
}

View File

@ -55,12 +55,6 @@ class CallManager {
fun getCallContact(context: Context, callback: (CallContact?) -> Unit) {
ensureBackgroundThread {
val callContact = CallContact("", "", "")
if (call == null || call?.details == null || call?.details?.handle == null) {
callback(callContact)
return@ensureBackgroundThread
}
// something here can be null even after the previous check, so do it like this
val handle = call?.details?.handle?.toString()
if (handle == null) {
callback(callContact)