Currently mic icon is active only when a call is connected
This commit is contained in:
@ -1147,13 +1147,15 @@ class MainActivity : AppCompatActivity() {
|
||||
when (item.itemId) {
|
||||
|
||||
R.id.micIcon -> {
|
||||
BaresipService.isMicMuted = !BaresipService.isMicMuted
|
||||
if (BaresipService.isMicMuted) {
|
||||
item.setIcon(R.drawable.mic_off)
|
||||
Api.calls_mute(true)
|
||||
} else {
|
||||
item.setIcon(R.drawable.mic_on)
|
||||
Api.calls_mute(false)
|
||||
if (Call.call("connected") != null) {
|
||||
BaresipService.isMicMuted = !BaresipService.isMicMuted
|
||||
if (BaresipService.isMicMuted) {
|
||||
item.setIcon(R.drawable.mic_off)
|
||||
Api.calls_mute(true)
|
||||
} else {
|
||||
item.setIcon(R.drawable.mic_on)
|
||||
Api.calls_mute(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1672,6 +1674,10 @@ class MainActivity : AppCompatActivity() {
|
||||
rejectButton.visibility = View.INVISIBLE
|
||||
callControl.visibility = View.INVISIBLE
|
||||
dialpadButton.isEnabled = true
|
||||
if (BaresipService.isMicMuted) {
|
||||
BaresipService.isMicMuted = false
|
||||
micIcon!!.setIcon(R.drawable.mic_on)
|
||||
}
|
||||
} else {
|
||||
swipeRefresh.isEnabled = false
|
||||
val call = Call.uaCalls(ua, "")[0]
|
||||
|
||||
Reference in New Issue
Block a user