mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Only show 'call can be trusted' toast when SAS is validated
This commit is contained in:
parent
523b762cac
commit
e19e9bfdc7
2 changed files with 8 additions and 15 deletions
|
|
@ -207,16 +207,6 @@ class ActiveCallFragment : GenericCallFragment() {
|
|||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
}
|
||||
|
||||
callViewModel.isRemoteDeviceTrusted.observe(viewLifecycleOwner) { trusted ->
|
||||
if (trusted) {
|
||||
(requireActivity() as CallActivity).showBlueToast(
|
||||
getString(R.string.toast_call_can_be_trusted),
|
||||
R.drawable.trusted,
|
||||
doNotTint = true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
callViewModel.showZrtpSasDialogEvent.observe(viewLifecycleOwner) {
|
||||
it.consume { pair ->
|
||||
val model = ZrtpSasConfirmationDialogModel(pair.first, pair.second)
|
||||
|
|
@ -232,6 +222,14 @@ class ActiveCallFragment : GenericCallFragment() {
|
|||
event.consume { verified ->
|
||||
callViewModel.updateZrtpSas(verified)
|
||||
dialog.dismiss()
|
||||
|
||||
if (verified) {
|
||||
(requireActivity() as CallActivity).showBlueToast(
|
||||
getString(R.string.toast_call_can_be_trusted),
|
||||
R.drawable.trusted,
|
||||
doNotTint = true
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,8 +131,6 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
// ZRTP related
|
||||
|
||||
val isRemoteDeviceTrusted = MutableLiveData<Boolean>()
|
||||
|
||||
val showZrtpSasDialogEvent: MutableLiveData<Event<Pair<String, String>>> by lazy {
|
||||
MutableLiveData<Event<Pair<String, String>>>()
|
||||
}
|
||||
|
|
@ -699,9 +697,6 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
|
|||
Log.i(
|
||||
"$TAG Current call media encryption is ZRTP, auth token is ${if (isDeviceTrusted) "trusted" else "not trusted yet"}"
|
||||
)
|
||||
if (isDeviceTrusted != isRemoteDeviceTrusted.value) {
|
||||
isRemoteDeviceTrusted.postValue(isDeviceTrusted)
|
||||
}
|
||||
val securityLevel = if (isDeviceTrusted) SecurityLevel.Safe else SecurityLevel.Encrypted
|
||||
val avatarModel = contact.value
|
||||
if (avatarModel != null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue