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

This commit is contained in:
Treehugger Robot
2020-02-12 03:04:03 +00:00
committed by Gerrit Code Review

View File

@@ -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