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

Commit f364fccf authored by Jake Hamby's avatar Jake Hamby Committed by Android (Google) Code Review
Browse files

Merge "Fix detection of CDMA cell broadcast messages." into jb-dev

parents 7ba01780 15c257eb
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -468,7 +468,13 @@ public class SmsMessage extends SmsMessageBase {
     *  {@link com.android.internal.telephony.cdma.sms.SmsEnvelope#MESSAGE_TYPE_ACKNOWLEDGE},
    */
    /* package */ int getMessageType() {
        return mEnvelope.messageType;
        // NOTE: mEnvelope.messageType is not set correctly for cell broadcasts with some RILs.
        // Use the service category parameter to detect CMAS and other cell broadcast messages.
        if (mEnvelope.serviceCategory != 0) {
            return SmsEnvelope.MESSAGE_TYPE_BROADCAST;
        } else {
            return SmsEnvelope.MESSAGE_TYPE_POINT_TO_POINT;
        }
    }

    /**