merge in jb-mr1-release history after reset to jb-mr1-dev
diff --git a/src/java/com/google/android/mms/pdu/PduPersister.java b/src/java/com/google/android/mms/pdu/PduPersister.java
index 7178c6c..0a9b626 100644
--- a/src/java/com/google/android/mms/pdu/PduPersister.java
+++ b/src/java/com/google/android/mms/pdu/PduPersister.java
@@ -35,6 +35,7 @@
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;
@@ -1211,15 +1212,22 @@
*
* @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, boolean groupMmsEnabled)
- throws MmsException {
+ public Uri persist(GenericPdu pdu, Uri uri, boolean createThreadId) throws MmsException {
if (uri == null) {
throw new MmsException("Uri may not be null.");
}
@@ -1328,9 +1336,7 @@
// 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);
- if (groupMmsEnabled) {
- loadRecipients(PduHeaders.TO, recipients, addressMap, true);
- }
+ loadRecipients(PduHeaders.TO, recipients, addressMap, true);
break;
case PduHeaders.MESSAGE_TYPE_SEND_REQ:
loadRecipients(PduHeaders.TO, recipients, addressMap, false);