mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-17 03:51:03 +01:00
close the call instantly if it ended and the user presses the red button
This commit is contained in:
parent
ae42a735e7
commit
a9fff376ea
@ -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…
x
Reference in New Issue
Block a user