- Always send "started" event to main activity after baresip is started

- No need to send "ua added" events to main activity
This commit is contained in:
Juha Heinanen
2021-01-21 17:10:49 +02:00
parent 31fa509d34
commit ad66007d58
2 changed files with 24 additions and 30 deletions
@@ -427,11 +427,6 @@ class BaresipService: Service() {
else
status.add(R.drawable.dot_yellow)
}
val intent = Intent("service event")
intent.putExtra("event", "ua added")
intent.putExtra("params", arrayListOf(uap))
LocalBroadcastManager.getInstance(this).sendBroadcast(intent)
updateStatusNotification()
}
@Keep
@@ -862,13 +857,11 @@ class BaresipService: Service() {
@Keep
fun started() {
Log.d(LOG_TAG, "Received 'started' from baresip")
if (callActionUri != "") {
val intent = Intent("service event")
intent.putExtra("event", "started")
intent.putExtra("params", arrayListOf(callActionUri))
LocalBroadcastManager.getInstance(this).sendBroadcast(intent)
callActionUri = ""
}
val intent = Intent("service event")
intent.putExtra("event", "started")
intent.putExtra("params", arrayListOf(callActionUri))
LocalBroadcastManager.getInstance(this).sendBroadcast(intent)
callActionUri = ""
}
@Keep