mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-27 19:36:21 +00:00
Try to prevent race condition when call is ending with call quality icon update
This commit is contained in:
parent
c9fdbf6f9d
commit
9d3e3f1bc8
1 changed files with 15 additions and 12 deletions
|
|
@ -1341,6 +1341,8 @@ class CurrentCallViewModel
|
||||||
delay(1000)
|
delay(1000)
|
||||||
coreContext.postOnCoreThread {
|
coreContext.postOnCoreThread {
|
||||||
if (::currentCall.isInitialized) {
|
if (::currentCall.isInitialized) {
|
||||||
|
val state = currentCall.state
|
||||||
|
if (!LinphoneUtils.isCallEnding(state, true)) {
|
||||||
val quality = currentCall.currentQuality
|
val quality = currentCall.currentQuality
|
||||||
val icon = when {
|
val icon = when {
|
||||||
quality >= 4 -> R.drawable.cell_signal_full
|
quality >= 4 -> R.drawable.cell_signal_full
|
||||||
|
|
@ -1351,13 +1353,14 @@ class CurrentCallViewModel
|
||||||
}
|
}
|
||||||
qualityValue.postValue(quality)
|
qualityValue.postValue(quality)
|
||||||
qualityIcon.postValue(icon)
|
qualityIcon.postValue(icon)
|
||||||
}
|
|
||||||
|
|
||||||
updateCallQualityIcon()
|
updateCallQualityIcon()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@WorkerThread
|
@WorkerThread
|
||||||
private fun updateAvatarModelSecurityLevel(trusted: Boolean) {
|
private fun updateAvatarModelSecurityLevel(trusted: Boolean) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue