Removed unused service event and call status, renamed service event
This commit is contained in:
@@ -195,7 +195,10 @@ class ConnectionService : ConnectionService() {
|
|||||||
}
|
}
|
||||||
val isSpeaker = it.route == CallAudioState.ROUTE_SPEAKER
|
val isSpeaker = it.route == CallAudioState.ROUTE_SPEAKER
|
||||||
BaresipService.postServiceEvent(
|
BaresipService.postServiceEvent(
|
||||||
ServiceEvent("speaker,${isSpeaker}", arrayListOf(uap, callp), System.nanoTime())
|
ServiceEvent("speaker update,${isSpeaker}",
|
||||||
|
arrayListOf(uap, callp),
|
||||||
|
System.nanoTime()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2180,7 +2180,7 @@ private fun showCall(ctx: Context, viewModel: ViewModel, ua: UserAgent?, showCal
|
|||||||
}
|
}
|
||||||
Log.d(TAG, "Showing call ${call.callp} from ${call.ua.account.aor} with status ${call.status.value}")
|
Log.d(TAG, "Showing call ${call.callp} from ${call.ua.account.aor} with status ${call.status.value}")
|
||||||
when (call.status.value) {
|
when (call.status.value) {
|
||||||
"outgoing", "transferring", "answered", "disconnecting" -> {
|
"outgoing", "transferring", "answered" -> {
|
||||||
call.callUriLabel.value = if (call.status.value == "answered")
|
call.callUriLabel.value = if (call.status.value == "answered")
|
||||||
ctx.getString(R.string.incoming_call_from_dots)
|
ctx.getString(R.string.incoming_call_from_dots)
|
||||||
else
|
else
|
||||||
@@ -2347,9 +2347,6 @@ fun handleServiceEvent(ctx: Context, viewModel: ViewModel, event: String, params
|
|||||||
"call update" -> {
|
"call update" -> {
|
||||||
showCall(ctx, viewModel, ua)
|
showCall(ctx, viewModel, ua)
|
||||||
}
|
}
|
||||||
"update calls" -> {
|
|
||||||
viewModel.updateCalls(Call.calls().toList())
|
|
||||||
}
|
|
||||||
"call verify" -> {
|
"call verify" -> {
|
||||||
val callp = params[1] as Long
|
val callp = params[1] as Long
|
||||||
val call = Call.ofCallp(callp)
|
val call = Call.ofCallp(callp)
|
||||||
@@ -2475,7 +2472,7 @@ fun handleServiceEvent(ctx: Context, viewModel: ViewModel, event: String, params
|
|||||||
else
|
else
|
||||||
viewModel.updateMicIcon(Icons.Filled.Mic)
|
viewModel.updateMicIcon(Icons.Filled.Mic)
|
||||||
}
|
}
|
||||||
"speaker" -> {
|
"speaker update" -> {
|
||||||
viewModel.updateSpeakerPhoneStatus(ev[1].toBoolean())
|
viewModel.updateSpeakerPhoneStatus(ev[1].toBoolean())
|
||||||
}
|
}
|
||||||
else -> Log.e(TAG, "Unknown event '${ev[0]}'")
|
else -> Log.e(TAG, "Unknown event '${ev[0]}'")
|
||||||
|
|||||||
Reference in New Issue
Block a user