summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authortakuo <kitame@gmail.com>2010-06-01 18:56:54 +0900
committertakuo <kitame@gmail.com>2010-06-09 23:46:58 +0900
commit14f1eb57db8c2b541a7e110cbf5a4eaf9cacc6b3 (patch)
tree4c626dc0063dc87af8afcc921561f7c16a4e04a3 /core
parentef367529f9c7a538d74599b37b49ac309d0a8d8c (diff)
downloadframeworks_base-14f1eb57db8c2b541a7e110cbf5a4eaf9cacc6b3.zip
frameworks_base-14f1eb57db8c2b541a7e110cbf5a4eaf9cacc6b3.tar.gz
frameworks_base-14f1eb57db8c2b541a7e110cbf5a4eaf9cacc6b3.tar.bz2
Should accept "application/vnd.wap.multipart.alternative" message.
Unfortunately, PduParser does not allow application/vnd.wap.multipart.alternative as M-RETRIEVE.CONF but some Mobile carrier send message with this type. This patch allows that and take the first part of multipart as message body. It fixes http://code.google.com/p/android/issues/detail?id=8957 Change-Id: Ic93259c91331d1e67100439114b7c4f43a834368
Diffstat (limited to 'core')
-rw-r--r--core/java/com/google/android/mms/pdu/PduParser.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/com/google/android/mms/pdu/PduParser.java b/core/java/com/google/android/mms/pdu/PduParser.java
index 1cd118b..92d5cc4 100644
--- a/core/java/com/google/android/mms/pdu/PduParser.java
+++ b/core/java/com/google/android/mms/pdu/PduParser.java
@@ -161,6 +161,13 @@ public class PduParser {
// The MMS content type must be "application/vnd.wap.multipart.mixed"
// or "application/vnd.wap.multipart.related"
return retrieveConf;
+ } else if (ctTypeStr.equals(ContentType.MULTIPART_ALTERNATIVE)) {
+ // "application/vnd.wap.multipart.alternative"
+ // should take only the first part.
+ PduPart firstPart = mBody.getPart(0);
+ mBody.removeAll();
+ mBody.addPart(0, firstPart);
+ return retrieveConf;
}
return null;
case PduHeaders.MESSAGE_TYPE_DELIVERY_IND: