From 422b4c345b5a5d32212f40bfc54993f5850bf243 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Thu, 10 Aug 2017 12:17:05 -0700 Subject: [PATCH] Catch IllegalArgumentException thrown internally on some devices // FREEBIE --- src/org/thoughtcrime/securesms/jobs/SmsSendJob.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java b/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java index 62c77d3bc5..944ff9a864 100644 --- a/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java +++ b/src/org/thoughtcrime/securesms/jobs/SmsSendJob.java @@ -104,7 +104,7 @@ public class SmsSendJob extends SendJob { // repeatedly crash every time you start the app. try { getSmsManagerFor(message.getSubscriptionId()).sendMultipartTextMessage(recipient, null, messages, sentIntents, deliveredIntents); - } catch (NullPointerException npe) { + } catch (NullPointerException | IllegalArgumentException npe) { Log.w(TAG, npe); Log.w(TAG, "Recipient: " + recipient); Log.w(TAG, "Message Parts: " + messages.size()); @@ -115,7 +115,7 @@ public class SmsSendJob extends SendJob { sentIntents.get(i), deliveredIntents == null ? null : deliveredIntents.get(i)); } - } catch (NullPointerException npe2) { + } catch (NullPointerException | IllegalArgumentException npe2) { Log.w(TAG, npe); throw new UndeliverableMessageException(npe2); }