Currently mic icon is active only when a call is connected
This commit is contained in:
@@ -1147,6 +1147,7 @@ class MainActivity : AppCompatActivity() {
|
||||
when (item.itemId) {
|
||||
|
||||
R.id.micIcon -> {
|
||||
if (Call.call("connected") != null) {
|
||||
BaresipService.isMicMuted = !BaresipService.isMicMuted
|
||||
if (BaresipService.isMicMuted) {
|
||||
item.setIcon(R.drawable.mic_off)
|
||||
@@ -1156,6 +1157,7 @@ class MainActivity : AppCompatActivity() {
|
||||
Api.calls_mute(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
R.id.speakerIcon -> {
|
||||
am.isSpeakerphoneOn = !am.isSpeakerphoneOn
|
||||
@@ -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