Fixed potential ANR when using auto answer
This commit is contained in:
parent
63a8fdd118
commit
1a1bfee678
1 changed files with 4 additions and 6 deletions
|
@ -142,13 +142,11 @@ class CoreContext(val context: Context, coreConfig: Config) {
|
|||
Log.w("[Context] Auto answering call immediately")
|
||||
answerCall(call)
|
||||
} else {
|
||||
val timer = Timer("Auto answer scheduler")
|
||||
Log.i("[Context] Scheduling auto answering in $autoAnswerDelay milliseconds")
|
||||
timer.schedule(object : TimerTask() {
|
||||
override fun run() {
|
||||
Log.w("[Context] Auto answering call")
|
||||
answerCall(call)
|
||||
}
|
||||
val mainThreadHandler = Handler(Looper.getMainLooper())
|
||||
mainThreadHandler.postDelayed({
|
||||
Log.w("[Context] Auto answering call")
|
||||
answerCall(call)
|
||||
}, autoAnswerDelay.toLong())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue