Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4322ec00 authored by takuo's avatar takuo Committed by Steve Kondik
Browse files

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
parent 5c5c0346
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -163,6 +163,13 @@ public class PduParser {
                    // or "application/vnd.wap.multipart.related"
                    // or "application/vnd.wap.multipart.related"
                    // or "application/vnd.wap.multipart.alternative"
                    // or "application/vnd.wap.multipart.alternative"
                    return retrieveConf;
                    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;
                return null;
            case PduHeaders.MESSAGE_TYPE_DELIVERY_IND:
            case PduHeaders.MESSAGE_TYPE_DELIVERY_IND: