mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
ref: only end call if state is STATE_CONNECTING or STATE_DIALING
This commit is contained in:
@ -70,8 +70,6 @@ class CallActivity : SimpleActivity() {
|
|||||||
if (proximityWakeLock?.isHeld == true) {
|
if (proximityWakeLock?.isHeld == true) {
|
||||||
proximityWakeLock!!.release()
|
proximityWakeLock!!.release()
|
||||||
}
|
}
|
||||||
|
|
||||||
endCall()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
@ -82,7 +80,8 @@ class CallActivity : SimpleActivity() {
|
|||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CallManager.getState() == Call.STATE_DIALING) {
|
val callState = CallManager.getState()
|
||||||
|
if (callState == Call.STATE_CONNECTING || callState == Call.STATE_DIALING) {
|
||||||
endCall()
|
endCall()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user