diff --git a/res/drawable-xhdpi/lime_ko.png b/res/drawable-xhdpi/lime_ko.png
new file mode 100644
index 000000000..17dea795e
Binary files /dev/null and b/res/drawable-xhdpi/lime_ko.png differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6e071247a..ac9b8f769 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -187,6 +187,7 @@
Error, image not saved
Please wait...
An error occurred during the file transfer
+ Warning, this message is not encrypted
You are trying to send a message using LIME to a contact not verified by ZRTP.\nPlease call this contact and verify his ZRTP key before sending your messages.
Processing image, can take up to a few seconds depending on the size of the file
diff --git a/src/org/linphone/ChatFragment.java b/src/org/linphone/ChatFragment.java
index 08882b598..6d8ee3917 100644
--- a/src/org/linphone/ChatFragment.java
+++ b/src/org/linphone/ChatFragment.java
@@ -1135,6 +1135,15 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
view.setId(holder.id);
registerForContextMenu(view);
+ view.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (!message.isSecured() &&
+ LinphoneManager.getLc().getLimeEncryption() == LinphoneCore.LinphoneLimeState.Mandatory) {
+ LinphoneUtils.displayErrorAlert(getString(R.string.message_not_encrypted), LinphoneActivity.instance());
+ }
+ }
+ });
LinphoneChatMessage.State status = message.getStatus();
String externalBodyUrl = message.getExternalBodyUrl();
@@ -1174,9 +1183,12 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if (status == LinphoneChatMessage.State.NotDelivered) {
holder.messageStatus.setVisibility(View.VISIBLE);
holder.messageStatus.setImageResource(R.drawable.chat_message_not_delivered);
-
} else if (status == LinphoneChatMessage.State.InProgress) {
holder.messageSendingInProgress.setVisibility(View.VISIBLE);
+ } else if (!message.isSecured() &&
+ LinphoneManager.getLc().getLimeEncryption() == LinphoneCore.LinphoneLimeState.Mandatory) {
+ holder.messageStatus.setVisibility(View.VISIBLE);
+ holder.messageStatus.setImageResource(R.drawable.lime_ko);
}
if (externalBodyUrl != null || fileTransferContent != null) {
diff --git a/submodules/linphone b/submodules/linphone
index 9551c9118..1cf4eda4a 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit 9551c9118a660453a3d01f2ffee8ae8750be66be
+Subproject commit 1cf4eda4aac0fdd1fdac150f6e0592368bf93459