summaryrefslogtreecommitdiffstats
path: root/core/java/com/google
diff options
context:
space:
mode:
authorWei Huang <weih@google.com>2009-09-27 13:32:24 -0700
committerWei Huang <weih@google.com>2009-09-27 13:39:46 -0700
commitc6b336d6a411ceacba4aa0dab9a01a5083729c71 (patch)
tree2b10b36577294a568fd1179848572355681aa3c2 /core/java/com/google
parente7d60bfdff35ad8eace600d2a6cb81163c966bb0 (diff)
downloadframeworks_base-c6b336d6a411ceacba4aa0dab9a01a5083729c71.zip
frameworks_base-c6b336d6a411ceacba4aa0dab9a01a5083729c71.tar.gz
frameworks_base-c6b336d6a411ceacba4aa0dab9a01a5083729c71.tar.bz2
bug 2148061: if PduBody is zero length, treat it as an empty message.
Change-Id: I2f352dd481f6b8d02b67cd3a44d692e3a5d03999
Diffstat (limited to 'core/java/com/google')
-rw-r--r--core/java/com/google/android/mms/pdu/PduComposer.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/com/google/android/mms/pdu/PduComposer.java b/core/java/com/google/android/mms/pdu/PduComposer.java
index 2aa5e48..8940945 100644
--- a/core/java/com/google/android/mms/pdu/PduComposer.java
+++ b/core/java/com/google/android/mms/pdu/PduComposer.java
@@ -850,8 +850,7 @@ public class PduComposer {
PositionMarker ctStart = mStack.mark();
// This contentTypeIdentifier should be used for type of attachment...
- String contentType = new String(
- mPduHeader.getTextString(PduHeaders.CONTENT_TYPE));
+ String contentType = new String(mPduHeader.getTextString(PduHeaders.CONTENT_TYPE));
Integer contentTypeIdentifier = mContentTypeMap.get(contentType);
if (contentTypeIdentifier == null) {
// content type is mandatory
@@ -862,7 +861,7 @@ public class PduComposer {
// content-type parameter: start
PduBody body = ((SendReq) mPdu).getBody();
- if (null == body) {
+ if (null == body || body.getPartsNum() == 0) {
// empty message
appendUintvarInteger(0);
mStack.pop();