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

Commit 29b19bfb authored by William C. Garrison III's avatar William C. Garrison III Committed by Adnan Begovic
Browse files

Telephony: If no wrapped message, originating address is null

A Verizon HTC m8 user reported this error:

http://pastebin.com/3LaYGB6X

which means that mWrappedSmsMessage is null, meaning it wasn't created
successfully by createFromPdu(pdu, format). Let's let getOriginatingAddress()
report this as a null, and see if createFromPdu(pdu) can create the wrapped
message properly.

Even if it's still a null, TextUtils.isEmpty will return true, meaning the
message's address won't be returned (better than crashing com.process.phone).

Change-Id: I419bc3e6045b0cf7d62a348a0be02555e0f7b76e
parent 9e20514b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ public class SmsMessage {
     * form or null if unavailable
     */
    public String getOriginatingAddress() {
        return mWrappedSmsMessage.getOriginatingAddress();
        return mWrappedSmsMessage != null ? mWrappedSmsMessage.getOriginatingAddress() : null;
    }

    /**