mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Do ZRTP SAS validation again button now working
This commit is contained in:
parent
91e0cb5838
commit
34c3dff137
2 changed files with 7 additions and 8 deletions
|
|
@ -26,9 +26,10 @@ import org.linphone.core.Call
|
|||
import org.linphone.core.MediaEncryption
|
||||
import org.linphone.core.StreamType
|
||||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class CallMediaEncryptionModel @WorkerThread constructor() {
|
||||
class CallMediaEncryptionModel @WorkerThread constructor(
|
||||
private val showZrtpSasValidationDialog: () -> Unit
|
||||
) {
|
||||
val mediaEncryption = MutableLiveData<String>()
|
||||
|
||||
val isMediaEncryptionZrtp = MutableLiveData<Boolean>()
|
||||
|
|
@ -38,10 +39,6 @@ class CallMediaEncryptionModel @WorkerThread constructor() {
|
|||
val zrtpAuthTag = MutableLiveData<String>()
|
||||
val zrtpAuthSas = MutableLiveData<String>()
|
||||
|
||||
val showZrtpSasValidationDialogEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
fun update(call: Call) {
|
||||
isMediaEncryptionZrtp.postValue(false)
|
||||
|
|
@ -112,6 +109,6 @@ class CallMediaEncryptionModel @WorkerThread constructor() {
|
|||
}
|
||||
|
||||
fun showSasValidationDialog() {
|
||||
showZrtpSasValidationDialogEvent.value = Event(true)
|
||||
showZrtpSasValidationDialog.invoke()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,9 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
val callStatsModel = CallStatsModel()
|
||||
|
||||
val callMediaEncryptionModel = CallMediaEncryptionModel()
|
||||
val callMediaEncryptionModel = CallMediaEncryptionModel() {
|
||||
showZrtpSasDialogIfPossible()
|
||||
}
|
||||
|
||||
val incomingCallTitle: MutableLiveData<String> by lazy {
|
||||
MutableLiveData<String>()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue