File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
telephony/java/com/android/internal/telephony/gsm Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,13 @@ protected int dispatchMessage(SmsMessageBase smsb) {
9494 SmsMessage sms = (SmsMessage ) smsb ;
9595 boolean handled = false ;
9696
97+ if (sms .isTypeZero ()) {
98+ // As per 3GPP TS 23.040 9.2.3.9, Type Zero messages should not be
99+ // Displayed/Stored/Notified. They should only be acknowledged.
100+ Log .d (TAG , "Received short message type 0, Dont display or store it. Send Ack" );
101+ return Intents .RESULT_SMS_HANDLED ;
102+ }
103+
97104 // Special case the message waiting indicator messages
98105 if (sms .isMWISetMessage ()) {
99106 mGsmPhone .updateMessageWaitingIndicator (true );
Original file line number Diff line number Diff line change @@ -110,6 +110,14 @@ public static SmsMessage createFromPdu(byte[] pdu) {
110110 }
111111 }
112112
113+ /**
114+ * 3GPP TS 23.040 9.2.3.9 specifies that Type Zero messages are indicated
115+ * by TP_PID field set to value 0x40
116+ */
117+ public boolean isTypeZero () {
118+ return (protocolIdentifier == 0x40 );
119+ }
120+
113121 /**
114122 * TS 27.005 3.4.1 lines[0] and lines[1] are the two lines read from the
115123 * +CMT unsolicited response (PDU mode, of course)
You can’t perform that action at this time.
0 commit comments