diff --git a/res/drawable-xhdpi/chat_secure.png b/res/drawable-xhdpi/chat_secure.png new file mode 100644 index 000000000..cc4b93786 Binary files /dev/null and b/res/drawable-xhdpi/chat_secure.png differ diff --git a/res/drawable-xhdpi/chat_unsecure.png b/res/drawable-xhdpi/chat_unsecure.png new file mode 100644 index 000000000..7c80434d8 Binary files /dev/null and b/res/drawable-xhdpi/chat_unsecure.png differ diff --git a/res/layout/chat_bubble.xml b/res/layout/chat_bubble.xml index 39692013a..74c25108f 100644 --- a/res/layout/chat_bubble.xml +++ b/res/layout/chat_bubble.xml @@ -146,7 +146,8 @@ android:layout_alignTop="@id/background" android:layout_width="15dp" android:layout_height="15dp" - android:paddingTop="5dp"> + android:paddingTop="5dp" + android:paddingBottom="3dp"> > onLinphoneChatMessageStateChanged - state = "+state.toString()); + } @Override @@ -1192,10 +1193,11 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC if (status == LinphoneChatMessage.State.InProgress) { holder.messageSendingInProgress.setVisibility(View.VISIBLE); - } else if (!message.isSecured() && !message.isOutgoing() && - LinphoneManager.getLc().getLimeEncryption() == LinphoneCore.LinphoneLimeState.Mandatory) { + } + if (!message.isSecured() && !message.isOutgoing() && + LinphoneManager.getLc().getLimeEncryption() == LinphoneCore.LinphoneLimeState.Mandatory && status != LinphoneChatMessage.State.InProgress) { holder.messageStatus.setVisibility(View.VISIBLE); - holder.messageStatus.setImageResource(R.drawable.lime_ko); + holder.messageStatus.setImageResource(R.drawable.chat_unsecure); } if(status == State.DeliveredToUser && message.isOutgoing()){ holder.imdmLayout.setVisibility(View.VISIBLE); diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index d91ba26f4..e84ff60c7 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -1107,7 +1107,8 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag LinphoneManager.getInstance().setAreDisplayAlertMessage(false); } }); - dialog.show(); + if(LinphoneManager.getLc().getLimeEncryption() == LinphoneCore.LinphoneLimeState.Mandatory) + dialog.show(); } } catch (Exception e) { Log.e(e);