forked from mirror/monocles_chat_clean
In case of invalid XML in the payloads, at least still load the message
This commit is contained in:
parent
3cee2f18b0
commit
03f2f9e79a
1 changed files with 6 additions and 2 deletions
|
@ -309,8 +309,12 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
|
|||
final XmlReader xmlReader = new XmlReader();
|
||||
xmlReader.setInputStream(ByteSource.wrap(payloadsStr.getBytes()).openStream());
|
||||
Tag tag;
|
||||
while ((tag = xmlReader.readTag()) != null) {
|
||||
payloads.add(xmlReader.readElement(tag));
|
||||
try {
|
||||
while ((tag = xmlReader.readTag()) != null) {
|
||||
payloads.add(xmlReader.readElement(tag));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e(Config.LOGTAG, "Failed to parse: " + payloadsStr, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue