From 04c8250738f4eeee0206c992db041d8f8a299523 Mon Sep 17 00:00:00 2001 From: Brieuc Viel Date: Thu, 30 Mar 2017 16:43:45 +0200 Subject: [PATCH] [LIME] new icons incerter --- res/drawable-xhdpi/chat_secure.png | Bin 0 -> 449 bytes res/drawable-xhdpi/chat_unsecure.png | Bin 0 -> 298 bytes res/layout/chat_bubble.xml | 3 ++- src/org/linphone/ChatFragment.java | 12 +++++++----- src/org/linphone/LinphoneManager.java | 3 ++- 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 res/drawable-xhdpi/chat_secure.png create mode 100644 res/drawable-xhdpi/chat_unsecure.png diff --git a/res/drawable-xhdpi/chat_secure.png b/res/drawable-xhdpi/chat_secure.png new file mode 100644 index 0000000000000000000000000000000000000000..cc4b9378667abe068103646b29640266242a2c75 GIT binary patch literal 449 zcmV;y0Y3hTP)J7QaU(0>25{^om@o- zHNhhI6BPXe;v^D^qu|iN55zX+dSA$Wq-jgtZ6JB)opbIdEnkD~mb;&t2zGhF zO=--{KH}jc<$Eua+?zd3bI?0qj#FGNl?UFvH)AkkUTv`DZ^|fWc%Mc+`qw?Oc&ERl r9UvIz|BLyR4DSl>elFnM|E0aZg5h%!7%s!J00000NkvXXu0mjf7MH}p literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/chat_unsecure.png b/res/drawable-xhdpi/chat_unsecure.png new file mode 100644 index 0000000000000000000000000000000000000000..7c80434d8e7a75cceb6562b316969ae327bbce3d GIT binary patch literal 298 zcmV+_0oDGAP)?58|E+D}08~tQ1fhKnyUY z;wri??ajQ)B?Pn_U^d&Kd(yZ`_I07*qoM6N<$g4vgKUH||9 literal 0 HcmV?d00001 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);