This commit is contained in:
Mysochenko Yuriy
2022-05-11 17:21:34 +03:00
parent bfbbfef242
commit c65cc9574d
2 changed files with 3 additions and 10 deletions

View File

@ -135,14 +135,6 @@ class CallActivity : SimpleActivity() {
toggleHold() toggleHold()
} }
call_conference.setOnClickListener {
/*if (is conference) {
// show manage conference screen
} else {
// show dialpad and contacts
}*/
}
call_end.setOnClickListener { call_end.setOnClickListener {
endCall() endCall()
} }

View File

@ -10,6 +10,7 @@ import com.simplemobiletools.commons.extensions.getPhoneNumberTypeText
import com.simplemobiletools.commons.helpers.MyContactsContentProvider import com.simplemobiletools.commons.helpers.MyContactsContentProvider
import com.simplemobiletools.commons.helpers.SimpleContactsHelper import com.simplemobiletools.commons.helpers.SimpleContactsHelper
import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.dialer.extensions.getStateCompat
import com.simplemobiletools.dialer.models.CallContact import com.simplemobiletools.dialer.models.CallContact
// inspired by https://github.com/Chooloo/call_manage // inspired by https://github.com/Chooloo/call_manage
@ -24,7 +25,7 @@ class CallManager {
fun reject() { fun reject() {
if (call != null) { if (call != null) {
if (call!!.state == Call.STATE_RINGING) { if (call!!.getStateCompat() == Call.STATE_RINGING) {
call!!.reject(false, null) call!!.reject(false, null)
} else { } else {
call!!.disconnect() call!!.disconnect()
@ -53,7 +54,7 @@ class CallManager {
fun getState() = if (call == null) { fun getState() = if (call == null) {
Call.STATE_DISCONNECTED Call.STATE_DISCONNECTED
} else { } else {
call!!.state call!!.getStateCompat()
} }
fun keypad(c: Char) { fun keypad(c: Char) {