diff --git a/app/src/main/java/org/linphone/contacts/AbstractAvatarModel.kt b/app/src/main/java/org/linphone/contacts/AbstractAvatarModel.kt index c20ea64a1..e6b1dde4c 100644 --- a/app/src/main/java/org/linphone/contacts/AbstractAvatarModel.kt +++ b/app/src/main/java/org/linphone/contacts/AbstractAvatarModel.kt @@ -1,10 +1,10 @@ package org.linphone.contacts import androidx.lifecycle.MutableLiveData -import org.linphone.core.ChatRoom +import org.linphone.core.SecurityLevel abstract class AbstractAvatarModel { - val trust = MutableLiveData() + val trust = MutableLiveData() val showTrust = MutableLiveData() diff --git a/app/src/main/java/org/linphone/contacts/ContactsManager.kt b/app/src/main/java/org/linphone/contacts/ContactsManager.kt index 991fff628..35479133d 100644 --- a/app/src/main/java/org/linphone/contacts/ContactsManager.kt +++ b/app/src/main/java/org/linphone/contacts/ContactsManager.kt @@ -50,6 +50,7 @@ import org.linphone.core.Factory import org.linphone.core.Friend import org.linphone.core.FriendList import org.linphone.core.FriendListListenerStub +import org.linphone.core.SecurityLevel import org.linphone.core.tools.Log import org.linphone.ui.main.MainActivity import org.linphone.ui.main.contacts.model.ContactAvatarModel @@ -179,7 +180,8 @@ class ContactsManager @UiThread constructor() { "$TAG Found SIP URI [$sipUri] in knownContactsAvatarsMap, forcing presence update" ) val oldModel = knownContactsAvatarsMap[sipUri] - oldModel?.update() + val address = Factory.instance().createAddress(sipUri) + oldModel?.update(address) } } @@ -337,6 +339,7 @@ class ContactsManager @UiThread constructor() { fakeFriend.name = LinphoneUtils.getDisplayName(localAccount.params.identityAddress) fakeFriend.photo = localAccount.params.pictureUri val model = ContactAvatarModel(fakeFriend) + model.trust.postValue(SecurityLevel.EndToEndEncryptedAndVerified) // TODO CHECK: as it is ourselves, force encrypted level? unknownContactsAvatarsMap[key] = model model } else { @@ -344,7 +347,7 @@ class ContactsManager @UiThread constructor() { val friend = coreContext.contactsManager.findContactByAddress(clone) if (friend != null) { Log.d("$TAG Matching friend [${friend.name}] found for SIP URI [$key]") - val model = ContactAvatarModel(friend) + val model = ContactAvatarModel(friend, address) knownContactsAvatarsMap[key] = model model } else { @@ -383,7 +386,7 @@ class ContactsManager @UiThread constructor() { } Log.w("$TAG Avatar model not found in map with SIP URI [$key]") - val avatar = ContactAvatarModel(friend) + val avatar = ContactAvatarModel(friend, address) knownContactsAvatarsMap[key] = avatar return avatar diff --git a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt index c2a0ad2f6..92526b3b1 100644 --- a/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt +++ b/app/src/main/java/org/linphone/ui/call/viewmodel/CurrentCallViewModel.kt @@ -41,11 +41,11 @@ import org.linphone.core.AudioDevice import org.linphone.core.Call import org.linphone.core.CallListenerStub import org.linphone.core.CallStats -import org.linphone.core.ChatRoom.SecurityLevel import org.linphone.core.Core import org.linphone.core.CoreListenerStub import org.linphone.core.MediaDirection import org.linphone.core.MediaEncryption +import org.linphone.core.SecurityLevel import org.linphone.core.StreamType import org.linphone.core.tools.Log import org.linphone.ui.call.model.AudioDeviceModel @@ -722,11 +722,18 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() { Log.i( "$TAG Current call media encryption is ZRTP, auth token is ${if (isDeviceTrusted) "trusted" else "not trusted yet"}" ) - val securityLevel = if (isDeviceTrusted) SecurityLevel.Safe else SecurityLevel.Encrypted + val securityLevel = if (isDeviceTrusted) SecurityLevel.EndToEndEncryptedAndVerified else SecurityLevel.EndToEndEncrypted val avatarModel = contact.value if (avatarModel != null) { avatarModel.trust.postValue(securityLevel) contact.postValue(avatarModel) + + // Also update avatar contact model if any for the rest of the app + val address = currentCall.remoteAddress + val storedModel = coreContext.contactsManager.getContactAvatarModelForAddress( + address + ) + storedModel.updateSecurityLevel(address) } else { Log.e("$TAG No avatar model found!") } @@ -829,7 +836,7 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() { // coreContext.contactsManager.getContactAvatarModelForAddress(address) val friend = coreContext.contactsManager.findContactByAddress(address) if (friend != null) { - ContactAvatarModel(friend) + ContactAvatarModel(friend, address) } else { val fakeFriend = coreContext.core.createFriend() fakeFriend.name = LinphoneUtils.getDisplayName(address) @@ -837,6 +844,7 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() { ContactAvatarModel(fakeFriend) } } + updateEncryption() contact.postValue(model) diff --git a/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt b/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt index 8125a0d3f..d4cc9a8f4 100644 --- a/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt +++ b/app/src/main/java/org/linphone/ui/main/contacts/fragment/ContactFragment.kt @@ -38,7 +38,9 @@ import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs import com.google.android.material.bottomsheet.BottomSheetDialogFragment import java.io.File +import org.linphone.LinphoneApplication.Companion.coreContext import org.linphone.R +import org.linphone.core.Factory import org.linphone.core.tools.Log import org.linphone.databinding.ContactFragmentBinding import org.linphone.ui.main.MainActivity @@ -289,8 +291,8 @@ class ContactFragment : SlidingPaneChildFragment() { dialog.show() } - private fun showConfirmTrustCallDialog(contact: String, device: String) { - val model = TrustCallDialogModel(contact, device) + private fun showConfirmTrustCallDialog(contactName: String, deviceSipUri: String) { + val model = TrustCallDialogModel(contactName, deviceSipUri) val dialog = DialogUtils.getContactTrustCallConfirmationDialog(requireActivity(), model) model.dismissEvent.observe(viewLifecycleOwner) { @@ -304,7 +306,12 @@ class ContactFragment : SlidingPaneChildFragment() { if (model.doNotShowAnymore.value == true) { // TODO: never display this anymore } - // TODO: start call + coreContext.postOnCoreThread { + val address = Factory.instance().createAddress(deviceSipUri) + if (address != null) { + coreContext.startCall(address, forceZRTP = true) + } + } dialog.dismiss() } } diff --git a/app/src/main/java/org/linphone/ui/main/contacts/model/ContactAvatarModel.kt b/app/src/main/java/org/linphone/ui/main/contacts/model/ContactAvatarModel.kt index f9ac6922d..08ca160a8 100644 --- a/app/src/main/java/org/linphone/ui/main/contacts/model/ContactAvatarModel.kt +++ b/app/src/main/java/org/linphone/ui/main/contacts/model/ContactAvatarModel.kt @@ -26,7 +26,7 @@ import org.linphone.LinphoneApplication.Companion.coreContext import org.linphone.R import org.linphone.contacts.AbstractAvatarModel import org.linphone.contacts.getNativeContactPictureUri -import org.linphone.core.ChatRoom.SecurityLevel +import org.linphone.core.Address import org.linphone.core.ConsolidatedPresence import org.linphone.core.Friend import org.linphone.core.FriendListenerStub @@ -35,7 +35,7 @@ import org.linphone.ui.main.model.isInSecureMode import org.linphone.utils.AppUtils import org.linphone.utils.TimestampUtils -class ContactAvatarModel @WorkerThread constructor(val friend: Friend) : AbstractAvatarModel() { +class ContactAvatarModel @WorkerThread constructor(val friend: Friend, val address: Address? = null) : AbstractAvatarModel() { companion object { private const val TAG = "[Contact Avatar Model]" } @@ -69,7 +69,7 @@ class ContactAvatarModel @WorkerThread constructor(val friend: Friend) : Abstrac friend.addListener(friendListener) } - update() + update(address) } @WorkerThread @@ -80,15 +80,25 @@ class ContactAvatarModel @WorkerThread constructor(val friend: Friend) : Abstrac } @WorkerThread - fun update() { + fun update(address: Address?) { + updateSecurityLevel(address) + isFavourite.postValue(friend.starred) initials.postValue(AppUtils.getInitials(friend.name.orEmpty())) - trust.postValue(SecurityLevel.Encrypted) // TODO FIXME: use API showTrust.postValue(coreContext.core.defaultAccount?.isInSecureMode()) images.postValue(arrayListOf(getAvatarUri(friend).toString())) name.postValue(friend.name) - computePresence() + computePresence(address) + } + + @WorkerThread + fun updateSecurityLevel(address: Address?) { + if (address == null) { + trust.postValue(friend.securityLevel) + } else { + trust.postValue(friend.getSecurityLevelForAddress(address)) + } } @WorkerThread @@ -111,8 +121,12 @@ class ContactAvatarModel @WorkerThread constructor(val friend: Friend) : Abstrac } @WorkerThread - private fun computePresence() { - val presence = friend.consolidatedPresence + private fun computePresence(address: Address? = null) { + val presence = if (address == null) { + friend.consolidatedPresence + } else { + friend.getPresenceModelForUriOrTel(address.asStringUriOnly())?.consolidatedPresence ?: friend.consolidatedPresence + } Log.d("$TAG Friend [${friend.name}] presence status is [$presence]") presenceStatus.postValue(presence) diff --git a/app/src/main/java/org/linphone/ui/main/contacts/model/ContactDeviceModel.kt b/app/src/main/java/org/linphone/ui/main/contacts/model/ContactDeviceModel.kt index ce391f6ea..10c747b78 100644 --- a/app/src/main/java/org/linphone/ui/main/contacts/model/ContactDeviceModel.kt +++ b/app/src/main/java/org/linphone/ui/main/contacts/model/ContactDeviceModel.kt @@ -21,9 +21,11 @@ package org.linphone.ui.main.contacts.model import androidx.annotation.UiThread import androidx.annotation.WorkerThread +import org.linphone.core.Address class ContactDeviceModel @WorkerThread constructor( val name: String, + val address: Address, val trusted: Boolean, private val onCall: ((model: ContactDeviceModel) -> Unit)? = null ) { diff --git a/app/src/main/java/org/linphone/ui/main/contacts/viewmodel/ContactViewModel.kt b/app/src/main/java/org/linphone/ui/main/contacts/viewmodel/ContactViewModel.kt index 396e468fd..446015ee8 100644 --- a/app/src/main/java/org/linphone/ui/main/contacts/viewmodel/ContactViewModel.kt +++ b/app/src/main/java/org/linphone/ui/main/contacts/viewmodel/ContactViewModel.kt @@ -33,10 +33,14 @@ import org.linphone.R import org.linphone.contacts.ContactsManager import org.linphone.contacts.getListOfSipAddressesAndPhoneNumbers import org.linphone.core.Address +import org.linphone.core.Call import org.linphone.core.ChatRoom import org.linphone.core.ChatRoomListenerStub import org.linphone.core.ChatRoomParams +import org.linphone.core.Core +import org.linphone.core.CoreListenerStub import org.linphone.core.Friend +import org.linphone.core.SecurityLevel import org.linphone.core.tools.Log import org.linphone.ui.main.contacts.model.ContactAvatarModel import org.linphone.ui.main.contacts.model.ContactDeviceModel @@ -63,6 +67,9 @@ class ContactViewModel @UiThread constructor() : ViewModel() { val devices = MutableLiveData>() + val trustedDevicesPercentage = MutableLiveData() + val trustedDevicesPercentageFloat = MutableLiveData() + val company = MutableLiveData() val title = MutableLiveData() @@ -207,17 +214,35 @@ class ContactViewModel @UiThread constructor() : ViewModel() { } } + private val coreListener = object : CoreListenerStub() { + override fun onCallStateChanged( + core: Core, + call: Call, + state: Call.State?, + message: String + ) { + if (call.state == Call.State.End) { + // Updates trust if need be + fetchDevicesAndTrust() + } + } + } + private lateinit var friend: Friend private var refKey: String = "" init { expandNumbersAndAddresses.value = true - expandDevicesTrust.value = false // TODO FIXME: set it to true when it will work for real + trustedDevicesPercentage.value = 0 coreContext.postOnCoreThread { core -> + core.addListener(coreListener) chatDisabled.postValue(corePreferences.disableChat) videoCallDisabled.postValue(!core.isVideoEnabled) + expandDevicesTrust.postValue( + LinphoneUtils.getDefaultAccount()?.isInSecureMode() == true + ) coreContext.contactsManager.addListener(contactsListener) } } @@ -226,7 +251,8 @@ class ContactViewModel @UiThread constructor() : ViewModel() { override fun onCleared() { super.onCleared() - coreContext.postOnCoreThread { + coreContext.postOnCoreThread { core -> + core.removeListener(coreListener) coreContext.contactsManager.removeListener(contactsListener) contact.value?.destroy() } @@ -267,21 +293,7 @@ class ContactViewModel @UiThread constructor() : ViewModel() { val addressesAndNumbers = friend.getListOfSipAddressesAndPhoneNumbers(listener) sipAddressesAndPhoneNumbers.postValue(addressesAndNumbers) - val devicesList = arrayListOf() - // TODO FIXME: use real devices list from API - devicesList.add(ContactDeviceModel("Pixel 6 Pro de Sylvain", true)) - devicesList.add(ContactDeviceModel("Sylvain Galaxy Tab S9 Pro+ Ultra", true)) - devicesList.add( - ContactDeviceModel("MacBook Pro de Marcel", false) { - // TODO: check if do not show dialog anymore setting is set - if (::friend.isInitialized) { - startCallToDeviceToIncreaseTrustEvent.value = - Event(Pair(friend.name.orEmpty(), it.name)) - } - } - ) - devicesList.add(ContactDeviceModel("sylvain@fedora-linux-38", true)) - devices.postValue(devicesList) + fetchDevicesAndTrust() } @UiThread @@ -596,4 +608,45 @@ class ContactViewModel @UiThread constructor() : ViewModel() { } } } + + @WorkerThread + private fun fetchDevicesAndTrust() { + val devicesList = arrayListOf() + + val friendDevices = friend.devices + if (friendDevices.isEmpty()) { + Log.w("$TAG No device found for friend [${friend.name}]") + } else { + val devicesCount = friendDevices.size + var trustedDevicesCount = 0 + for (device in friendDevices) { + val trusted = device.securityLevel == SecurityLevel.EndToEndEncryptedAndVerified + devicesList.add( + ContactDeviceModel( + device.displayName ?: "???", // TODO: what to do if device name isn't available? + device.address, + trusted + ) { + // TODO: check if do not show dialog anymore setting is set + if (::friend.isInitialized) { + startCallToDeviceToIncreaseTrustEvent.value = + Event(Pair(friend.name.orEmpty(), it.address.asStringUriOnly())) + } + } + ) + if (trusted) { + trustedDevicesCount += 1 + } + } + + if (devicesList.isNotEmpty()) { + trustedDevicesPercentage.postValue(trustedDevicesCount * 100 / devicesCount.toInt()) + trustedDevicesPercentageFloat.postValue( + trustedDevicesCount / devicesCount.toFloat() / 2 + ) + } + } + + devices.postValue(devicesList) + } } diff --git a/app/src/main/java/org/linphone/ui/main/model/AccountModel.kt b/app/src/main/java/org/linphone/ui/main/model/AccountModel.kt index 472484fd9..1fe95d9ea 100644 --- a/app/src/main/java/org/linphone/ui/main/model/AccountModel.kt +++ b/app/src/main/java/org/linphone/ui/main/model/AccountModel.kt @@ -33,6 +33,7 @@ import org.linphone.core.ChatRoom import org.linphone.core.Core import org.linphone.core.CoreListenerStub import org.linphone.core.RegistrationState +import org.linphone.core.SecurityLevel import org.linphone.core.tools.Log import org.linphone.utils.AppUtils import org.linphone.utils.LinphoneUtils @@ -93,7 +94,7 @@ class AccountModel @WorkerThread constructor( account.addListener(accountListener) coreContext.core.addListener(coreListener) - trust.postValue(ChatRoom.SecurityLevel.Safe) + trust.postValue(SecurityLevel.EndToEndEncryptedAndVerified) showTrust.postValue(account.isInSecureMode()) update() diff --git a/app/src/main/java/org/linphone/utils/DataBindingUtils.kt b/app/src/main/java/org/linphone/utils/DataBindingUtils.kt index aea50d218..3db5dc928 100644 --- a/app/src/main/java/org/linphone/utils/DataBindingUtils.kt +++ b/app/src/main/java/org/linphone/utils/DataBindingUtils.kt @@ -39,6 +39,7 @@ import androidx.annotation.UiThread import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.AppCompatEditText import androidx.appcompat.widget.AppCompatTextView +import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.doOnLayout @@ -59,8 +60,8 @@ import org.linphone.BR import org.linphone.R import org.linphone.contacts.AbstractAvatarModel import org.linphone.contacts.AvatarGenerator -import org.linphone.core.ChatRoom import org.linphone.core.ConsolidatedPresence +import org.linphone.core.SecurityLevel import org.linphone.core.tools.Log import org.linphone.ui.call.model.ConferenceParticipantDeviceModel @@ -382,12 +383,12 @@ private fun loadContactPictureWithCoil( if (!skipTrust) { if (model.showTrust.value == true) { when (model.trust.value) { - ChatRoom.SecurityLevel.Safe -> { + SecurityLevel.EndToEndEncryptedAndVerified -> { imageView.setStrokeColorResource(R.color.info_500) imageView.setStrokeWidthResource(R.dimen.avatar_trust_border_width) } - ChatRoom.SecurityLevel.Unsafe -> { + SecurityLevel.Unsafe -> { imageView.setStrokeColorResource(R.color.danger_500) imageView.setStrokeWidthResource(R.dimen.avatar_trust_border_width) } @@ -499,6 +500,13 @@ fun setConstraintLayoutStartMargin(view: View, margins: Float) { view.layoutParams = params } +@BindingAdapter("layout_constraintHorizontal_bias") +fun setConstraintLayoutChildHorizontalBias(view: View, horizontalBias: Float) { + val params = view.layoutParams as ConstraintLayout.LayoutParams + params.horizontalBias = horizontalBias + view.layoutParams = params +} + @BindingAdapter("focusNextOnInput") fun focusNextOnInput(editText: EditText, enabled: Boolean) { if (!enabled) return diff --git a/app/src/main/res/layout/account_profile_fragment.xml b/app/src/main/res/layout/account_profile_fragment.xml index 9cf9c7200..8ef8ce0a3 100644 --- a/app/src/main/res/layout/account_profile_fragment.xml +++ b/app/src/main/res/layout/account_profile_fragment.xml @@ -5,7 +5,7 @@ - + @@ -110,7 +110,7 @@ android:layout_width="@dimen/avatar_presence_badge_big_size" android:layout_height="@dimen/avatar_presence_badge_big_size" android:layout_marginStart="@dimen/avatar_presence_badge_big_end_margin" - android:src="@{viewModel.accountModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:src="@{viewModel.accountModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" android:visibility="@{viewModel.accountModel.showTrust ? View.VISIBLE : View.GONE}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/address_selected_list_cell.xml b/app/src/main/res/layout/address_selected_list_cell.xml index 837b67c2f..158c342f7 100644 --- a/app/src/main/res/layout/address_selected_list_cell.xml +++ b/app/src/main/res/layout/address_selected_list_cell.xml @@ -6,7 +6,7 @@ - + @@ -45,9 +45,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_active_conference_fragment.xml b/app/src/main/res/layout/call_active_conference_fragment.xml index 12b94fd35..65c2910d2 100644 --- a/app/src/main/res/layout/call_active_conference_fragment.xml +++ b/app/src/main/res/layout/call_active_conference_fragment.xml @@ -5,7 +5,7 @@ - + - + @@ -75,9 +75,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_in_call_size" android:layout_height="@dimen/avatar_presence_badge_in_call_size" - android:src="@{viewModel.contact.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{viewModel.contact.trust == SecurityLevel.Safe || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{viewModel.contact.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_conference_active_speaker_cell.xml b/app/src/main/res/layout/call_conference_active_speaker_cell.xml index 8e111ce48..d09352cc0 100644 --- a/app/src/main/res/layout/call_conference_active_speaker_cell.xml +++ b/app/src/main/res/layout/call_conference_active_speaker_cell.xml @@ -4,7 +4,7 @@ - + @@ -43,9 +43,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_in_active_speaker_miniature_conference_call_size" android:layout_height="@dimen/avatar_presence_badge_in_active_speaker_miniature_conference_call_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_conference_active_speaker_fragment.xml b/app/src/main/res/layout/call_conference_active_speaker_fragment.xml index 9c411c199..e82d1f809 100644 --- a/app/src/main/res/layout/call_conference_active_speaker_fragment.xml +++ b/app/src/main/res/layout/call_conference_active_speaker_fragment.xml @@ -4,7 +4,7 @@ - + - + @@ -44,9 +44,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_conference_grid_cell.xml b/app/src/main/res/layout/call_conference_grid_cell.xml index b5b1647c9..94dd19f9a 100644 --- a/app/src/main/res/layout/call_conference_grid_cell.xml +++ b/app/src/main/res/layout/call_conference_grid_cell.xml @@ -4,7 +4,7 @@ - + @@ -43,9 +43,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_in_call_size" android:layout_height="@dimen/avatar_presence_badge_in_call_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_conference_participant_list_cell.xml b/app/src/main/res/layout/call_conference_participant_list_cell.xml index 0291cdcb5..837c31a54 100644 --- a/app/src/main/res/layout/call_conference_participant_list_cell.xml +++ b/app/src/main/res/layout/call_conference_participant_list_cell.xml @@ -5,7 +5,7 @@ - + @@ -43,9 +43,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_ended_fragment.xml b/app/src/main/res/layout/call_ended_fragment.xml index 1a1da5d32..c45320748 100644 --- a/app/src/main/res/layout/call_ended_fragment.xml +++ b/app/src/main/res/layout/call_ended_fragment.xml @@ -5,7 +5,7 @@ - + @@ -109,9 +109,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_in_call_size" android:layout_height="@dimen/avatar_presence_badge_in_call_size" - android:src="@{viewModel.contact.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{viewModel.contact.trust == SecurityLevel.Safe || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{viewModel.contact.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_incoming_fragment.xml b/app/src/main/res/layout/call_incoming_fragment.xml index d7d15c00b..9ea791066 100644 --- a/app/src/main/res/layout/call_incoming_fragment.xml +++ b/app/src/main/res/layout/call_incoming_fragment.xml @@ -5,7 +5,7 @@ - + @@ -55,9 +55,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_in_call_size" android:layout_height="@dimen/avatar_presence_badge_in_call_size" - android:src="@{viewModel.contact.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{viewModel.contact.trust == SecurityLevel.Safe || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{viewModel.contact.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/call_outgoing_fragment.xml b/app/src/main/res/layout/call_outgoing_fragment.xml index 7e1c7105c..d892312e7 100644 --- a/app/src/main/res/layout/call_outgoing_fragment.xml +++ b/app/src/main/res/layout/call_outgoing_fragment.xml @@ -5,7 +5,7 @@ - + @@ -55,9 +55,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_in_call_size" android:layout_height="@dimen/avatar_presence_badge_in_call_size" - android:src="@{viewModel.contact.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{viewModel.contact.trust == SecurityLevel.Safe || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{viewModel.contact.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified || viewModel.contact.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{viewModel.contact.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/chat_bubble_incoming.xml b/app/src/main/res/layout/chat_bubble_incoming.xml index a45e145e7..6e9e84781 100644 --- a/app/src/main/res/layout/chat_bubble_incoming.xml +++ b/app/src/main/res/layout/chat_bubble_incoming.xml @@ -6,6 +6,7 @@ + + + - + @@ -107,9 +107,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{viewModel.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{!viewModel.searchBarVisible && (viewModel.avatarModel.trust == SecurityLevel.Safe || viewModel.avatarModel.trust == SecurityLevel.Unsafe) ? View.VISIBLE : View.GONE}" - android:contentDescription="@{viewModel.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{viewModel.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{!viewModel.searchBarVisible && (viewModel.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || viewModel.avatarModel.trust == SecurityLevel.Unsafe) ? View.VISIBLE : View.GONE}" + android:contentDescription="@{viewModel.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/chat_info_fragment.xml b/app/src/main/res/layout/chat_info_fragment.xml index 298a00258..4187da5b8 100644 --- a/app/src/main/res/layout/chat_info_fragment.xml +++ b/app/src/main/res/layout/chat_info_fragment.xml @@ -5,7 +5,7 @@ - + @@ -101,6 +101,17 @@ app:layout_constraintEnd_toEndOf="@id/avatar" app:presenceIcon="@{viewModel.avatarModel.presenceStatus}" /> + + - + @@ -57,9 +57,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/chat_message_bottom_sheet_list_cell.xml b/app/src/main/res/layout/chat_message_bottom_sheet_list_cell.xml index 84e95a153..cba168346 100644 --- a/app/src/main/res/layout/chat_message_bottom_sheet_list_cell.xml +++ b/app/src/main/res/layout/chat_message_bottom_sheet_list_cell.xml @@ -6,7 +6,7 @@ - + @@ -48,9 +48,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/chat_participant_list_cell.xml b/app/src/main/res/layout/chat_participant_list_cell.xml index 59c085099..f5059e080 100644 --- a/app/src/main/res/layout/chat_participant_list_cell.xml +++ b/app/src/main/res/layout/chat_participant_list_cell.xml @@ -6,7 +6,7 @@ - + @@ -48,9 +48,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/contact_favourite_list_cell.xml b/app/src/main/res/layout/contact_favourite_list_cell.xml index e2fb2bae1..731b7de58 100644 --- a/app/src/main/res/layout/contact_favourite_list_cell.xml +++ b/app/src/main/res/layout/contact_favourite_list_cell.xml @@ -6,7 +6,7 @@ - + @@ -53,9 +53,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.trust == SecurityLevel.Safe || model.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/contact_fragment.xml b/app/src/main/res/layout/contact_fragment.xml index 522916968..1981c9685 100644 --- a/app/src/main/res/layout/contact_fragment.xml +++ b/app/src/main/res/layout/contact_fragment.xml @@ -6,7 +6,7 @@ - + @@ -100,8 +100,8 @@ + app:constraint_referenced_ids="trusted_devices_count, trusted_devices_progress, devices, trusted_devices_progress_label" + android:visibility="@{viewModel.expandDevicesTrust && viewModel.devices.size() > 0 ? View.VISIBLE : View.GONE}" /> @@ -364,7 +365,6 @@ android:drawableEnd="@drawable/question" android:drawableTint="?attr/color_main2_600" android:drawablePadding="8dp" - android:visibility="gone" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/info_background"/> @@ -379,11 +379,17 @@ android:padding="5dp" android:drawableEnd="@{viewModel.expandDevicesTrust ? @drawable/caret_up : @drawable/caret_down, default=@drawable/caret_up}" android:drawableTint="?attr/color_main2_600" - android:visibility="gone" app:layout_constraintStart_toEndOf="@id/trust_label" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/info_background"/> + + + app:layout_constraintBottom_toBottomOf="@id/trust_background_bottom_barrier"/> @@ -430,12 +437,14 @@ + + - + @@ -85,9 +85,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.trust == SecurityLevel.Safe || model.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/history_contact_fragment.xml b/app/src/main/res/layout/history_contact_fragment.xml index dd220a0ec..b3b323150 100644 --- a/app/src/main/res/layout/history_contact_fragment.xml +++ b/app/src/main/res/layout/history_contact_fragment.xml @@ -6,7 +6,7 @@ - + @@ -114,11 +114,12 @@ diff --git a/app/src/main/res/layout/history_list_cell.xml b/app/src/main/res/layout/history_list_cell.xml index 19d418ba4..0614c5b8e 100644 --- a/app/src/main/res/layout/history_list_cell.xml +++ b/app/src/main/res/layout/history_list_cell.xml @@ -7,7 +7,7 @@ - + @@ -60,9 +60,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/layout/meeting_participant_list_cell.xml b/app/src/main/res/layout/meeting_participant_list_cell.xml index c371eb913..7b220b895 100644 --- a/app/src/main/res/layout/meeting_participant_list_cell.xml +++ b/app/src/main/res/layout/meeting_participant_list_cell.xml @@ -6,7 +6,7 @@ - + @@ -45,9 +45,9 @@ android:id="@+id/trust_badge" android:layout_width="@dimen/avatar_presence_badge_size" android:layout_height="@dimen/avatar_presence_badge_size" - android:src="@{model.avatarModel.trust == SecurityLevel.Safe ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" - android:visibility="@{model.avatarModel.trust == SecurityLevel.Safe || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" - android:contentDescription="@{model.avatarModel.trust == SecurityLevel.Safe ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" + android:src="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}" + android:visibility="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.avatarModel.trust == SecurityLevel.Unsafe ? View.VISIBLE : View.GONE}" + android:contentDescription="@{model.avatarModel.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}" app:layout_constraintStart_toStartOf="@id/avatar" app:layout_constraintBottom_toBottomOf="@id/avatar"/> diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index a29597442..166c5c397 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -325,6 +325,7 @@ Entreprise : Poste : Confiance + Aucun appareil n\'a été trouvé… Appareils de confiance : Autres actions Modifier @@ -351,7 +352,7 @@ Appel Message Appel vidéo - Vérifier les appareils + Vérifier Aucune conversation pour le moment… En cours de suppression… diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 36856e576..38a2165c9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -372,6 +372,7 @@ Company: Job title: Trust + No device found… Number of trusted devices: Other actions Edit @@ -398,7 +399,7 @@ Call Message Video Call - Verify device + Verify No conversation for the moment…