Merge pull request #2341 from mcginty/mms-recv-null-text

don't fail on null received text parts
This commit is contained in:
Moxie Marlinspike 2015-01-13 12:35:22 -08:00
commit 9a31c5961a

View File

@ -24,7 +24,11 @@ public class PartParser {
if (characterSet.equals(CharacterSets.MIMENAME_ANY_CHARSET))
characterSet = CharacterSets.MIMENAME_ISO_8859_1;
if (body.getPart(i).getData() != null) {
partText = new String(body.getPart(i).getData(), characterSet);
} else {
partText = "";
}
} catch (UnsupportedEncodingException e) {
Log.w("PartParser", e);
partText = "Unsupported Encoding!";