close the call instantly if it ended and the user presses the red button
This commit is contained in:
parent
ae42a735e7
commit
a9fff376ea
1 changed files with 6 additions and 1 deletions
|
|
@ -156,13 +156,18 @@ class CallActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun endCall() {
|
||||
isCallEnded = true
|
||||
CallManager.reject()
|
||||
if (proximityWakeLock?.isHeld == true) {
|
||||
proximityWakeLock!!.release()
|
||||
}
|
||||
|
||||
audioManager.mode = AudioManager.MODE_NORMAL
|
||||
if (isCallEnded) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
isCallEnded = true
|
||||
if (callDuration > 0) {
|
||||
runOnUiThread {
|
||||
call_status_label.text = "${callDuration.getFormattedDuration()} (${getString(R.string.call_ended)})"
|
||||
|
|
|
|||
Loading…
Reference in a new issue