am 8feefb3e: am d35db5ec: Merge change 26946 into eclair

Merge commit '8feefb3e2067cc7d3c5b9c3b776538f264782021'

* commit '8feefb3e2067cc7d3c5b9c3b776538f264782021':
  Fix bug#2144742: guard against 0 length encoded string when attaching a 'from' address for MMS.
This commit is contained in:
Wei Huang
2009-09-25 11:13:43 -07:00
committed by Android Git Automerger

View File

@@ -19,6 +19,8 @@ package com.google.android.mms.pdu;
import android.content.ContentResolver;
import android.content.Context;
import android.util.Log;
import android.text.TextUtils;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
@@ -528,6 +530,7 @@ public class PduComposer {
EncodedStringValue from = mPduHeader.getEncodedStringValue(field);
if ((from == null)
|| TextUtils.isEmpty(from.getString())
|| new String(from.getTextString()).equals(
PduHeaders.FROM_INSERT_ADDRESS_TOKEN_STR)) {
// Length of from = 1