mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Fix call to security level
This commit is contained in:
parent
0cea9e4f75
commit
dcaae8e0dd
2 changed files with 15 additions and 13 deletions
|
|
@ -231,13 +231,13 @@ public class ChatRoomsAdapter extends ListSelectionAdapter {
|
|||
holder.displayName.setText(LinphoneUtils.getAddressDisplayName(contactAddress));
|
||||
}
|
||||
}
|
||||
|
||||
ChatRoomSecurityLevel level = chatRoom.getSecurityLevel();
|
||||
if (LinphoneManager.getLc().limeV2Enabled()) {
|
||||
if (chatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Safe) {
|
||||
if (level == ChatRoomSecurityLevel.Safe) {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_small_secure2);
|
||||
} else if (chatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Unsafe) {
|
||||
} else if (level == ChatRoomSecurityLevel.Unsafe) {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_small_unsecure);
|
||||
} else if (chatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Encrypted) {
|
||||
} else if (level == ChatRoomSecurityLevel.Encrypted) {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_small_secure1);
|
||||
} else {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_small_unregistered);
|
||||
|
|
@ -245,12 +245,13 @@ public class ChatRoomsAdapter extends ListSelectionAdapter {
|
|||
}
|
||||
} else {
|
||||
holder.displayName.setText(chatRoom.getSubject());
|
||||
ChatRoomSecurityLevel level = chatRoom.getSecurityLevel();
|
||||
if (LinphoneManager.getLc().limeV2Enabled()) {
|
||||
if (chatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Safe) {
|
||||
if (level == ChatRoomSecurityLevel.Safe) {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_group_small_secure2);
|
||||
} else if (chatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Unsafe) {
|
||||
} else if (level == ChatRoomSecurityLevel.Unsafe) {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_group_small_unsecure);
|
||||
} else if (chatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Encrypted) {
|
||||
} else if (level == ChatRoomSecurityLevel.Encrypted) {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_group_small_secure1);
|
||||
} else {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_group_small_unregistered);
|
||||
|
|
|
|||
|
|
@ -522,6 +522,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
mBackToCallButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBackToCallButton.setVisibility(View.GONE);
|
||||
ChatRoomSecurityLevel level = mChatRoom.getSecurityLevel();
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) {
|
||||
mCallButton.setVisibility(View.VISIBLE);
|
||||
mGroupInfosButton.setVisibility(View.GONE);
|
||||
|
|
@ -534,11 +535,11 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
} else {
|
||||
mRoomLabel.setText(mParticipants.get(0).getFullName());
|
||||
}
|
||||
if (mChatRoom.getSecurityLevel() == ChatRoomSecurityLevel.ClearText) {
|
||||
if (level == ChatRoomSecurityLevel.ClearText) {
|
||||
avatarTop.setImageResource(R.drawable.avatar_small_unregistered);
|
||||
} else if (mChatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Encrypted) {
|
||||
} else if (level == ChatRoomSecurityLevel.Encrypted) {
|
||||
avatarTop.setImageResource(R.drawable.avatar_small_secure1);
|
||||
} else if (mChatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Safe) {
|
||||
} else if (level == ChatRoomSecurityLevel.Safe) {
|
||||
avatarTop.setImageResource(R.drawable.avatar_small_secure2);
|
||||
} else {
|
||||
avatarTop.setImageResource(R.drawable.avatar_small_unsecure);
|
||||
|
|
@ -548,11 +549,11 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
mGroupInfosButton.setVisibility(View.VISIBLE);
|
||||
mRoomLabel.setText(mChatRoom.getSubject());
|
||||
mParticipantsLabel.setVisibility(View.VISIBLE);
|
||||
if (mChatRoom.getSecurityLevel() == ChatRoomSecurityLevel.ClearText) {
|
||||
if (level == ChatRoomSecurityLevel.ClearText) {
|
||||
avatarTop.setImageResource(R.drawable.avatar_group_small_unregistered);
|
||||
} else if (mChatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Encrypted) {
|
||||
} else if (level == ChatRoomSecurityLevel.Encrypted) {
|
||||
avatarTop.setImageResource(R.drawable.avatar_group_small_secure1);
|
||||
} else if (mChatRoom.getSecurityLevel() == ChatRoomSecurityLevel.Safe) {
|
||||
} else if (level == ChatRoomSecurityLevel.Safe) {
|
||||
avatarTop.setImageResource(R.drawable.avatar_group_small_secure2);
|
||||
} else {
|
||||
avatarTop.setImageResource(R.drawable.avatar_group_small_unsecure);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue