Skip to content
Snippets Groups Projects
Commit a36094c7 authored by Aline Bonnet's avatar Aline Bonnet Committed by gerrit2
Browse files

call: fix the reception of text messages

During a call, text messages were not received. IncomingMessage function  was
called but it only read the vCard.

Change-Id: I9eb7d7a69aba9b48768fa28631d6a4de0ec1101b
Tuleap: #918
parent 0ae7b7ab
No related branches found
No related tags found
No related merge requests found
...@@ -82,8 +82,7 @@ public class CallManagerCallBack extends Callback { ...@@ -82,8 +82,7 @@ public class CallManagerCallBack extends Callback {
if (messageKeyValue.containsKey(VCardUtils.VCARD_KEY_MIME_TYPE) && if (messageKeyValue.containsKey(VCardUtils.VCARD_KEY_MIME_TYPE) &&
messageKeyValue.get(VCardUtils.VCARD_KEY_MIME_TYPE).equals(textPlainMime)) { messageKeyValue.get(VCardUtils.VCARD_KEY_MIME_TYPE).equals(textPlainMime)) {
msg = messages.getRaw(textPlainMime).toJavaString(); msg = messages.getRaw(textPlainMime).toJavaString();
} } else if (messageKeyValue.containsKey(VCardUtils.VCARD_KEY_MIME_TYPE) &&
else if (messageKeyValue.containsKey(VCardUtils.VCARD_KEY_MIME_TYPE) &&
messageKeyValue.get(VCardUtils.VCARD_KEY_MIME_TYPE).equals(ringProfileVCardMime)) { messageKeyValue.get(VCardUtils.VCARD_KEY_MIME_TYPE).equals(ringProfileVCardMime)) {
int part = Integer.parseInt(messageKeyValue.get(VCardUtils.VCARD_KEY_PART)); int part = Integer.parseInt(messageKeyValue.get(VCardUtils.VCARD_KEY_PART));
int nbPart = Integer.parseInt(messageKeyValue.get(VCardUtils.VCARD_KEY_OF)); int nbPart = Integer.parseInt(messageKeyValue.get(VCardUtils.VCARD_KEY_OF));
...@@ -108,11 +107,14 @@ public class CallManagerCallBack extends Callback { ...@@ -108,11 +107,14 @@ public class CallManagerCallBack extends Callback {
mService.sendBroadcast(intent); mService.sendBroadcast(intent);
} }
} }
} else if (messages.has_key(textPlainMime)) {
msg = messages.getRaw(textPlainMime).toJavaString();
} }
} }
if (msg == null) if (msg == null) {
return; return;
}
Intent intent = new Intent(INCOMING_TEXT); Intent intent = new Intent(INCOMING_TEXT);
intent.putExtra("txt", msg); intent.putExtra("txt", msg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment