When resuming to baresip, check if its default app roles have changed
This commit is contained in:
@ -617,6 +617,12 @@ class BaresipService: Service() {
|
||||
|
||||
if (!aecAvailable)
|
||||
toast(getString(R.string.no_aec), Toast.LENGTH_LONG)
|
||||
|
||||
if (VERSION.SDK_INT >= 29) {
|
||||
val baresipService = Intent(this, BaresipService::class.java)
|
||||
baresipService.action = "Check Roles"
|
||||
startService(baresipService)
|
||||
}
|
||||
}
|
||||
|
||||
"Notification Dismissed" ->
|
||||
@ -751,6 +757,11 @@ class BaresipService: Service() {
|
||||
"Update Notification" ->
|
||||
updateStatusNotification()
|
||||
|
||||
"Check Roles" -> {
|
||||
if (isNativeReady)
|
||||
addMobileUserAgent()
|
||||
}
|
||||
|
||||
"Start Call" -> {
|
||||
val uap = intent!!.getLongExtra("uap", 0L)
|
||||
val uri = intent.getStringExtra("uri")!!
|
||||
|
||||
@ -314,6 +314,11 @@ class MainActivity : ComponentActivity() {
|
||||
super.onResume()
|
||||
Log.d(TAG, "Main onResume")
|
||||
nm.cancelAll()
|
||||
if (Build.VERSION.SDK_INT >= 29) {
|
||||
val baresipService = Intent(this, BaresipService::class.java)
|
||||
baresipService.action = "Check Roles"
|
||||
startService(baresipService)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
||||
Reference in New Issue
Block a user