Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 934f40aa authored by Taesu Lee's avatar Taesu Lee
Browse files

Return null for getSubmitPdu() for encoding failure instead of NPE



It returns null as API description for null message or null destination
instead of NPE.

Bug: 111731144
Test: atest SmsMessageTest

Change-Id: I1dc8537b6d07a43345c266122a1c77e73e58e7e8
Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
parent a77fbc25
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ public class SmsMessage {
                    destinationAddress, message, statusReportRequested);
        }

        return new SubmitPdu(spb);
        return spb != null ? new SubmitPdu(spb) : null;
    }

    /**
@@ -655,7 +655,7 @@ public class SmsMessage {
                    destinationAddress, destinationPort, data, statusReportRequested);
        }

        return new SubmitPdu(spb);
        return spb != null ? new SubmitPdu(spb) : null;
    }

    // TODO: SubmitPdu class is used for SMS-DELIVER also now. Refactor for SubmitPdu and new