diff options
author | Tom Taylor <tomtaylor@google.com> | 2010-07-21 11:26:17 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-07-21 11:26:17 -0700 |
commit | aa0f5550cbfe713d5a08e25b734b6b976ca1a127 (patch) | |
tree | b6ff9a3b2acc4845b02ed1cecdeda8db494e4747 /core | |
parent | 8a9a931fff2d184f7cf77fdd8a425f682f006cfd (diff) | |
parent | 92010ff5cf014c0ff73ee4ad4bb169dd916a15a9 (diff) | |
download | frameworks_base-aa0f5550cbfe713d5a08e25b734b6b976ca1a127.zip frameworks_base-aa0f5550cbfe713d5a08e25b734b6b976ca1a127.tar.gz frameworks_base-aa0f5550cbfe713d5a08e25b734b6b976ca1a127.tar.bz2 |
am 92010ff5: am dbac180d: Fix a merge problem with html mms
Merge commit '92010ff5cf014c0ff73ee4ad4bb169dd916a15a9' into gingerbread-plus-aosp
* commit '92010ff5cf014c0ff73ee4ad4bb169dd916a15a9':
Fix a merge problem with html mms
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/google/android/mms/pdu/PduParser.java | 4 | ||||
-rw-r--r-- | core/java/com/google/android/mms/pdu/PduPersister.java | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/core/java/com/google/android/mms/pdu/PduParser.java b/core/java/com/google/android/mms/pdu/PduParser.java index 92d5cc4..8edfe52 100644 --- a/core/java/com/google/android/mms/pdu/PduParser.java +++ b/core/java/com/google/android/mms/pdu/PduParser.java @@ -157,9 +157,11 @@ public class PduParser { } String ctTypeStr = new String(contentType); if (ctTypeStr.equals(ContentType.MULTIPART_MIXED) - || ctTypeStr.equals(ContentType.MULTIPART_RELATED)) { + || ctTypeStr.equals(ContentType.MULTIPART_RELATED) + || ctTypeStr.equals(ContentType.MULTIPART_ALTERNATIVE)) { // The MMS content type must be "application/vnd.wap.multipart.mixed" // or "application/vnd.wap.multipart.related" + // or "application/vnd.wap.multipart.alternative" return retrieveConf; } else if (ctTypeStr.equals(ContentType.MULTIPART_ALTERNATIVE)) { // "application/vnd.wap.multipart.alternative" diff --git a/core/java/com/google/android/mms/pdu/PduPersister.java b/core/java/com/google/android/mms/pdu/PduPersister.java index d4ac24a..9fdd204 100644 --- a/core/java/com/google/android/mms/pdu/PduPersister.java +++ b/core/java/com/google/android/mms/pdu/PduPersister.java @@ -422,7 +422,8 @@ public class PduPersister { // Store simple string values directly in the database instead of an // external file. This makes the text searchable and retrieval slightly // faster. - if ("text/plain".equals(type) || "application/smil".equals(type)) { + if (ContentType.TEXT_PLAIN.equals(type) || ContentType.APP_SMIL.equals(type) + || ContentType.TEXT_HTML.equals(type)) { String text = c.getString(PART_COLUMN_TEXT); byte [] blob = new EncodedStringValue(text != null ? text : "") .getTextString(); @@ -736,7 +737,9 @@ public class PduPersister { try { byte[] data = part.getData(); - if ("text/plain".equals(contentType) || "application/smil".equals(contentType)) { + if (ContentType.TEXT_PLAIN.equals(contentType) + || ContentType.APP_SMIL.equals(contentType) + || ContentType.TEXT_HTML.equals(contentType)) { ContentValues cv = new ContentValues(); cv.put(Telephony.Mms.Part.TEXT, new EncodedStringValue(data).getString()); if (mContentResolver.update(uri, cv, null, null) != 1) { |