diff options
author | Christian Gaetano <cgatno@gmail.com> | 2013-08-20 23:31:54 -0400 |
---|---|---|
committer | Christian Gaetano <cgatno@gmail.com> | 2013-08-20 23:31:54 -0400 |
commit | fc7f0f6a8962f4784ce987f7a69b1dfafaf63d38 (patch) | |
tree | b51797b54b237b920bd041fcff48d3a76115bffa /src | |
parent | 848b54ae56cb8fa8264f65365db65dc7f1921f81 (diff) | |
download | mms-fc7f0f6a8962f4784ce987f7a69b1dfafaf63d38.tar.gz |
mms: also load group message recipients from CC field
If group messaging is enabled by the user, the messaging framework should also
try to load any numbers in the CC PduHeader. Some devices initiate group
messaging by populating this field with the group members' phone numbers, and
they only place the first number in the TO header. This should solve threading
issues with these devices. loadRecipients() will handle the CC field correctly
if it is null.
Signed-off-by: Christian Gaetano <cgatno@gmail.com>
Change-Id: I955bb0912356f4d8fb648acd2bd9e6bba21c9a82
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/google/android/mms/pdu/PduPersister.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/com/google/android/mms/pdu/PduPersister.java b/src/java/com/google/android/mms/pdu/PduPersister.java index 61b80aa..94f1430 100644 --- a/src/java/com/google/android/mms/pdu/PduPersister.java +++ b/src/java/com/google/android/mms/pdu/PduPersister.java @@ -1347,6 +1347,11 @@ public class PduPersister { // we have to ignore it in loadRecipients. if (groupMmsEnabled) { loadRecipients(PduHeaders.TO, recipients, addressMap, true); + + // Also load any numbers in the CC field to address group messaging + // compatibility issues with devices that place numbers in this field + // for group messages. + loadRecipients(PduHeaders.CC, recipients, addressMap, true); } break; case PduHeaders.MESSAGE_TYPE_SEND_REQ: @@ -1442,8 +1447,8 @@ public class PduPersister { /** * For a given address type, extract the recipients from the headers. * - * @param addressType can be PduHeaders.FROM or PduHeaders.TO - * @param recipients a HashSet that is loaded with the recipients from the FROM or TO headers + * @param addressType can be PduHeaders.FROM, PduHeaders.TO or PduHeaders.CC + * @param recipients a HashSet that is loaded with the recipients from the FROM, TO or CC headers * @param addressMap a HashMap of the addresses from the ADDRESS_FIELDS header * @param excludeMyNumber if true, the number of this phone will be excluded from recipients */ |