Skip to content

Commit c16889d

Browse files
author
Naveen Kalla
committed
Type Zero Sms should not be displayed/stored/notified.
Type Zero messages indicated by TP_PID field set to value 0x40, should not be displayed/stored/notified. They should only be acknowledged.
1 parent 7bb2581 commit c16889d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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);

telephony/java/com/android/internal/telephony/gsm/SmsMessage.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)