From 6491500af16015724f8bb17732001222fb8297de Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 7 Feb 2013 15:35:39 +0100 Subject: [PATCH 1/5] adapt to small api changes --- src/org/linphone/ChatFragment.java | 6 +++--- src/org/linphone/LinphoneManager.java | 2 +- submodules/linphone | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/linphone/ChatFragment.java b/src/org/linphone/ChatFragment.java index b7de1fa4e..9dd8e8ffe 100644 --- a/src/org/linphone/ChatFragment.java +++ b/src/org/linphone/ChatFragment.java @@ -521,8 +521,8 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC public void onMessageReceived(int id, LinphoneAddress from, LinphoneChatMessage message) { if (from.asStringUriOnly().equals(sipUri)) { - if (message.getMessage() != null) { - displayMessage(id, message.getMessage(), String.valueOf(System.currentTimeMillis()), true, null, messagesLayout); + if (message.getText() != null) { + displayMessage(id, message.getText(), String.valueOf(System.currentTimeMillis()), true, null, messagesLayout); } else if (message.getExternalBodyUrl() != null) { Bitmap bm = downloadImage(message.getExternalBodyUrl()); displayImageMessage(id, bm, String.valueOf(System.currentTimeMillis()), true, null, messagesLayout); @@ -533,7 +533,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC @Override public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, State state) { - final String finalMessage = msg.getMessage(); + final String finalMessage = msg.getText(); final String finalImage = msg.getExternalBodyUrl(); final State finalState = state; if (LinphoneActivity.isInstanciated() && state != State.InProgress) { diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 4eed24eb2..e7afcb1b7 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -944,7 +944,7 @@ public final class LinphoneManager implements LinphoneCoreListener { LinphoneAddress from = message.getFrom(); ChatStorage chatStorage = new ChatStorage(mServiceContext); - String textMessage = message.getMessage(); + String textMessage = message.getText(); String url = message.getExternalBodyUrl(); String notificationText = null; int id = -1; diff --git a/submodules/linphone b/submodules/linphone index bf0953eb1..dd9241f22 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit bf0953eb1d3c83471c6950eea505bea4e67f93e6 +Subproject commit dd9241f226408096224f16df441c1cb67ce8193b From ce3697a66c7e1f9704d647d813e02b5afdcf5150 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 7 Feb 2013 18:47:43 +0100 Subject: [PATCH 2/5] update linphone submodule --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index dd9241f22..beede6a18 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit dd9241f226408096224f16df441c1cb67ce8193b +Subproject commit beede6a18d5599d1bebcbae702df3478c9a3ce69 From 8efd17f83a7d550f63f6fb316db6fed59ba57483 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Fri, 8 Feb 2013 14:56:53 +0100 Subject: [PATCH 3/5] Fix double downloading of pictures when chat --- src/org/linphone/ChatFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/ChatFragment.java b/src/org/linphone/ChatFragment.java index 9dd8e8ffe..2282bc375 100644 --- a/src/org/linphone/ChatFragment.java +++ b/src/org/linphone/ChatFragment.java @@ -524,7 +524,8 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC if (message.getText() != null) { displayMessage(id, message.getText(), String.valueOf(System.currentTimeMillis()), true, null, messagesLayout); } else if (message.getExternalBodyUrl() != null) { - Bitmap bm = downloadImage(message.getExternalBodyUrl()); + byte[] rawImage = LinphoneActivity.instance().getChatStorage().getRawImageFromMessage(id); + Bitmap bm = BitmapFactory.decodeByteArray(rawImage, 0, rawImage.length); displayImageMessage(id, bm, String.valueOf(System.currentTimeMillis()), true, null, messagesLayout); } scrollToEnd(); From d4f9f711f8845e0caed9f1545dabf9d637f893a1 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 8 Feb 2013 17:29:41 +0100 Subject: [PATCH 4/5] update exosip and linphone --- submodules/externals/exosip | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/externals/exosip b/submodules/externals/exosip index c76a9d434..ea5d69281 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit c76a9d4340f436d2f61f8b031d46bc511776b136 +Subproject commit ea5d692816953ac506464a53238f2103cda8cfee diff --git a/submodules/linphone b/submodules/linphone index beede6a18..c8e0246cc 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit beede6a18d5599d1bebcbae702df3478c9a3ce69 +Subproject commit c8e0246ccaae9f37d052bc8a4deab0a816f03a1a From f014edb9723c3e6c862e17c25164d3fd07f09593 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 11 Feb 2013 12:12:53 +0100 Subject: [PATCH 5/5] Update linphone submodule. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index c8e0246cc..47a02f34f 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit c8e0246ccaae9f37d052bc8a4deab0a816f03a1a +Subproject commit 47a02f34fdfaf89e5c73aa387a639234c7ffa8bc