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

Commit 5082fd58 authored by Satish Roddom's avatar Satish Roddom Committed by Wink Saville
Browse files

frameworks/base: Update mPdu in createFromPdu

Inside createFromPdu(), the passed-in parameter 'pdu' is assigned
to msg.mPdu, so that we can call getPdu() to get it back.
parent fca3ae15
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -518,6 +518,7 @@ public class SmsMessage extends SmsMessageBase {
        originatingAddress = addr;
        env.origAddress = addr;
        mEnvelope = env;
        mPdu = pdu;

        parseSms();
    }
@@ -728,9 +729,8 @@ public class SmsMessage extends SmsMessageBase {
            dos.close();

            /**
             * TODO(cleanup) -- This is the only place where mPdu is
             * defined, and this is not obviously the only place where
             * it needs to be defined.  It would be much nicer if
             * TODO(cleanup) -- The mPdu field is managed in
             * a fragile manner, and it would be much nicer if
             * accessing the serialized representation used a less
             * fragile mechanism.  Maybe the getPdu method could
             * generate a representation if there was not yet one?