mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 23:33:39 +00:00
Merge pull request #2341 from mcginty/mms-recv-null-text
don't fail on null received text parts
This commit is contained in:
commit
9a31c5961a
@ -24,7 +24,11 @@ public class PartParser {
|
|||||||
if (characterSet.equals(CharacterSets.MIMENAME_ANY_CHARSET))
|
if (characterSet.equals(CharacterSets.MIMENAME_ANY_CHARSET))
|
||||||
characterSet = CharacterSets.MIMENAME_ISO_8859_1;
|
characterSet = CharacterSets.MIMENAME_ISO_8859_1;
|
||||||
|
|
||||||
partText = new String(body.getPart(i).getData(), characterSet);
|
if (body.getPart(i).getData() != null) {
|
||||||
|
partText = new String(body.getPart(i).getData(), characterSet);
|
||||||
|
} else {
|
||||||
|
partText = "";
|
||||||
|
}
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
Log.w("PartParser", e);
|
Log.w("PartParser", e);
|
||||||
partText = "Unsupported Encoding!";
|
partText = "Unsupported Encoding!";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user