mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-03-14 02:10:10 +01:00
make some safety checks nicer
This commit is contained in:
parent
4ac11f6a42
commit
dc79228bc1
@ -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'
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user