mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-16 09:31:25 +00:00
extended log of encrypted and plaintext messages NullPointerException
This commit is contained in:
parent
1c8f8666ba
commit
ed4c8cd799
@ -60,12 +60,16 @@ public class SmsTransport {
|
|||||||
// and messages, this will throw an NPE. I have no idea why, so I'm just catching it and marking
|
// and messages, this will throw an NPE. I have no idea why, so I'm just catching it and marking
|
||||||
// the message as a failure. That way at least it doesn't repeatedly crash every time you start
|
// the message as a failure. That way at least it doesn't repeatedly crash every time you start
|
||||||
// the app.
|
// the app.
|
||||||
|
// d3sre 12/10/13 -- extended the log file to further analyse the problem
|
||||||
try {
|
try {
|
||||||
SmsManager.getDefault().sendTextMessage(message.getIndividualRecipient().getNumber(), null, messages.get(i),
|
SmsManager.getDefault().sendTextMessage(message.getIndividualRecipient().getNumber(), null, messages.get(i),
|
||||||
sentIntents.get(i),
|
sentIntents.get(i),
|
||||||
deliveredIntents == null ? null : deliveredIntents.get(i));
|
deliveredIntents == null ? null : deliveredIntents.get(i));
|
||||||
} catch (NullPointerException npe) {
|
} catch (NullPointerException npe) {
|
||||||
Log.w("SmsSender", npe);
|
Log.w("SmsSender", npe);
|
||||||
|
Log.w("SmsTransport", "Recipient: " + message.getIndividualRecipient().getNumber());
|
||||||
|
Log.w("SmsTransport", "Message Total Parts/Current: " + messages.size() + "/" + i);
|
||||||
|
Log.w("SmsTransport", "Message Part Length: " + messages.get(i).getBytes().length);
|
||||||
throw new UndeliverableMessageException(npe);
|
throw new UndeliverableMessageException(npe);
|
||||||
} catch (IllegalArgumentException iae) {
|
} catch (IllegalArgumentException iae) {
|
||||||
Log.w("SmsSender", iae);
|
Log.w("SmsSender", iae);
|
||||||
@ -87,10 +91,16 @@ public class SmsTransport {
|
|||||||
// and messages, this will throw an NPE. I have no idea why, so I'm just catching it and marking
|
// and messages, this will throw an NPE. I have no idea why, so I'm just catching it and marking
|
||||||
// the message as a failure. That way at least it doesn't repeatedly crash every time you start
|
// the message as a failure. That way at least it doesn't repeatedly crash every time you start
|
||||||
// the app.
|
// the app.
|
||||||
|
// d3sre 12/10/13 -- extended the log file to further analyse the problem
|
||||||
try {
|
try {
|
||||||
SmsManager.getDefault().sendMultipartTextMessage(recipient, null, messages, sentIntents, deliveredIntents);
|
SmsManager.getDefault().sendMultipartTextMessage(recipient, null, messages, sentIntents, deliveredIntents);
|
||||||
} catch (NullPointerException npe) {
|
} catch (NullPointerException npe) {
|
||||||
Log.w("SmsTransport", npe);
|
Log.w("SmsTransport", npe);
|
||||||
|
Log.w("SmsTransport", "Recipient: " + recipient);
|
||||||
|
Log.w("SmsTransport", "Message Parts: " + messages.size());
|
||||||
|
for (String messagePart: messages) {
|
||||||
|
Log.w("SmsTransport", "Message Part Length: " + messagePart.getBytes().length);
|
||||||
|
}
|
||||||
throw new UndeliverableMessageException(npe);
|
throw new UndeliverableMessageException(npe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user