summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2012-10-09 11:57:34 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-09 11:57:34 -0700
commit04c9f7fbbf64c4fa855ff4fbc4325c2aa0e74f83 (patch)
treec6f827a58b7a3662745289557272eb6f55ae7039
parent676aaa5f36bf1caa1b41631e0cdb476bbed20e08 (diff)
parenta7fc89ae6184eb8b92fd229e45ffa0bbe7bbf1da (diff)
downloadmms-04c9f7fbbf64c4fa855ff4fbc4325c2aa0e74f83.tar.gz
am a7fc89ae: am ab17014b: Support group mms setting
* commit 'a7fc89ae6184eb8b92fd229e45ffa0bbe7bbf1da': Support group mms setting
-rw-r--r--src/java/com/google/android/mms/pdu/PduPersister.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/java/com/google/android/mms/pdu/PduPersister.java b/src/java/com/google/android/mms/pdu/PduPersister.java
index 0a9b626..7178c6c 100644
--- a/src/java/com/google/android/mms/pdu/PduPersister.java
+++ b/src/java/com/google/android/mms/pdu/PduPersister.java
@@ -35,7 +35,6 @@ import android.database.DatabaseUtils;
import android.database.sqlite.SQLiteException;
import android.drm.DrmManagerClient;
import android.net.Uri;
-import android.os.FileUtils;
import android.provider.MediaStore;
import android.provider.Telephony;
import android.provider.Telephony.Mms;
@@ -1212,22 +1211,15 @@ public class PduPersister {
*
* @param pdu The PDU object to be stored.
* @param uri Where to store the given PDU object.
- * @return A Uri which can be used to access the stored PDU.
- */
- public Uri persist(GenericPdu pdu, Uri uri) throws MmsException {
- return persist(pdu, uri, true);
- }
-
- /**
- * Persist a PDU object to specific location in the storage.
- *
- * @param pdu The PDU object to be stored.
- * @param uri Where to store the given PDU object.
* @param createThreadId if true, this function may create a thread id for the recipients
+ * @param groupMmsEnabled if true, all of the recipients addressed in the PDU will be used
+ * to create the associated thread. When false, only the sender will be used in finding or
+ * creating the appropriate thread or conversation.
* @return A Uri which can be used to access the stored PDU.
*/
- public Uri persist(GenericPdu pdu, Uri uri, boolean createThreadId) throws MmsException {
+ public Uri persist(GenericPdu pdu, Uri uri, boolean createThreadId, boolean groupMmsEnabled)
+ throws MmsException {
if (uri == null) {
throw new MmsException("Uri may not be null.");
}
@@ -1336,7 +1328,9 @@ public class PduPersister {
// message or the FROM field in addition to the other people the message
// was addressed to or the TO field.
loadRecipients(PduHeaders.FROM, recipients, addressMap, false);
- loadRecipients(PduHeaders.TO, recipients, addressMap, true);
+ if (groupMmsEnabled) {
+ loadRecipients(PduHeaders.TO, recipients, addressMap, true);
+ }
break;
case PduHeaders.MESSAGE_TYPE_SEND_REQ:
loadRecipients(PduHeaders.TO, recipients, addressMap, false);