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)
|
if (!aecAvailable)
|
||||||
toast(getString(R.string.no_aec), Toast.LENGTH_LONG)
|
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" ->
|
"Notification Dismissed" ->
|
||||||
@ -751,6 +757,11 @@ class BaresipService: Service() {
|
|||||||
"Update Notification" ->
|
"Update Notification" ->
|
||||||
updateStatusNotification()
|
updateStatusNotification()
|
||||||
|
|
||||||
|
"Check Roles" -> {
|
||||||
|
if (isNativeReady)
|
||||||
|
addMobileUserAgent()
|
||||||
|
}
|
||||||
|
|
||||||
"Start Call" -> {
|
"Start Call" -> {
|
||||||
val uap = intent!!.getLongExtra("uap", 0L)
|
val uap = intent!!.getLongExtra("uap", 0L)
|
||||||
val uri = intent.getStringExtra("uri")!!
|
val uri = intent.getStringExtra("uri")!!
|
||||||
|
|||||||
@ -314,6 +314,11 @@ class MainActivity : ComponentActivity() {
|
|||||||
super.onResume()
|
super.onResume()
|
||||||
Log.d(TAG, "Main onResume")
|
Log.d(TAG, "Main onResume")
|
||||||
nm.cancelAll()
|
nm.cancelAll()
|
||||||
|
if (Build.VERSION.SDK_INT >= 29) {
|
||||||
|
val baresipService = Intent(this, BaresipService::class.java)
|
||||||
|
baresipService.action = "Check Roles"
|
||||||
|
startService(baresipService)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
|||||||
Reference in New Issue
Block a user