mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
clean up
This commit is contained in:
@ -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()
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
Reference in New Issue
Block a user