ref: only end call if state is STATE_CONNECTING or STATE_DIALING

This commit is contained in:
darthpaul 2021-09-19 23:51:47 +01:00
parent 288b50da7f
commit dd6316ae81
1 changed files with 2 additions and 3 deletions

View File

@ -70,8 +70,6 @@ class CallActivity : SimpleActivity() {
if (proximityWakeLock?.isHeld == true) {
proximityWakeLock!!.release()
}
endCall()
}
override fun onBackPressed() {
@ -82,7 +80,8 @@ class CallActivity : SimpleActivity() {
super.onBackPressed()
}
if (CallManager.getState() == Call.STATE_DIALING) {
val callState = CallManager.getState()
if (callState == Call.STATE_CONNECTING || callState == Call.STATE_DIALING) {
endCall()
}
}