Synched handling of events
This commit is contained in:
@@ -2371,11 +2371,13 @@ fun handleServiceEvent(ctx: Context, viewModel: ViewModel, event: String, params
|
||||
fun handleNextEvent(logMessage: String? = null) {
|
||||
if (logMessage != null)
|
||||
Log.w(TAG, logMessage)
|
||||
synchronized(BaresipService.serviceEvents) {
|
||||
if (BaresipService.serviceEvents.isNotEmpty()) {
|
||||
val first = BaresipService.serviceEvents.removeAt(0)
|
||||
handleServiceEvent(ctx, viewModel, first.event, first.params)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event == "started") {
|
||||
val uriString = params[0] as String
|
||||
|
||||
Reference in New Issue
Block a user