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

Commit 12849c80 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Code Review
Browse files

Merge "Type Zero Sms should not be displayed/stored/notified."

parents 1e936da2 c16889dc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -94,6 +94,13 @@ final class GsmSMSDispatcher extends SMSDispatcher {
        SmsMessage sms = (SmsMessage) smsb;
        boolean handled = false;

        if (sms.isTypeZero()) {
            // As per 3GPP TS 23.040 9.2.3.9, Type Zero messages should not be
            // Displayed/Stored/Notified. They should only be acknowledged.
            Log.d(TAG, "Received short message type 0, Dont display or store it. Send Ack");
            return Intents.RESULT_SMS_HANDLED;
        }

        // Special case the message waiting indicator messages
        if (sms.isMWISetMessage()) {
            mGsmPhone.updateMessageWaitingIndicator(true);
+8 −0
Original line number Diff line number Diff line
@@ -110,6 +110,14 @@ public class SmsMessage extends SmsMessageBase{
        }
    }

    /**
     * 3GPP TS 23.040 9.2.3.9 specifies that Type Zero messages are indicated
     * by TP_PID field set to value 0x40
     */
    public boolean isTypeZero() {
        return (protocolIdentifier == 0x40);
    }

    /**
     * TS 27.005 3.4.1 lines[0] and lines[1] are the two lines read from the
     * +CMT unsolicited response (PDU mode, of course)