fixed crash when deleting an account
This commit is contained in:
@ -8,7 +8,7 @@ android {
|
|||||||
applicationId = 'com.tutpro.baresip'
|
applicationId = 'com.tutpro.baresip'
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode = 7
|
versionCode = 8
|
||||||
versionName = '1.0'
|
versionName = '1.0'
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'armeabi-v7a'
|
abiFilters 'armeabi-v7a'
|
||||||
|
|||||||
@ -217,7 +217,7 @@ class BaresipService: Service() {
|
|||||||
if (!IS_SERVICE_RUNNING) return
|
if (!IS_SERVICE_RUNNING) return
|
||||||
val ua = UserAgent.find(MainActivity.uas, uap)
|
val ua = UserAgent.find(MainActivity.uas, uap)
|
||||||
if (ua == null) {
|
if (ua == null) {
|
||||||
Log.e(LOG_TAG, "updateStatus did not find ua $uap")
|
Log.w(LOG_TAG, "updateStatus did not find ua $uap")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val aor = ua.account.aor
|
val aor = ua.account.aor
|
||||||
|
|||||||
@ -314,7 +314,11 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun handleServiceEvent(event: String, uap: String, callp: String) {
|
private fun handleServiceEvent(event: String, uap: String, callp: String) {
|
||||||
val ua = UserAgent.find(uas, uap)!!
|
val ua = UserAgent.find(uas, uap)
|
||||||
|
if (ua == null) {
|
||||||
|
Log.w("Baresip", "handleServiceEvent '$event' did not find ua $uap")
|
||||||
|
return
|
||||||
|
}
|
||||||
val aor = ua.account.aor
|
val aor = ua.account.aor
|
||||||
val acc = ua.account
|
val acc = ua.account
|
||||||
val ev = event.split(",")
|
val ev = event.split(",")
|
||||||
|
|||||||
Reference in New Issue
Block a user