am d35db5ec: Merge change 26946 into eclair

Merge commit 'd35db5ec8bd5ef07840fa84318284df04a69411c' into eclair-plus-aosp

* commit 'd35db5ec8bd5ef07840fa84318284df04a69411c':
  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-24 16:19:52 -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