diff options
author | Naveen Kalla <nkalla@codeaurora.org> | 2010-03-24 06:46:14 -0700 |
---|---|---|
committer | Naveen Kalla <nkalla@codeaurora.org> | 2010-03-26 05:42:04 -0700 |
commit | c16889dc0034daaf50b2307c4de6c16c4964f30c (patch) | |
tree | 4d8966b14572903a232a2d4f559f0d0dd765fcde /telephony | |
parent | 7bb2581e6f404da0edba9ebb81b0d0593715eb40 (diff) | |
download | frameworks_base-c16889dc0034daaf50b2307c4de6c16c4964f30c.zip frameworks_base-c16889dc0034daaf50b2307c4de6c16c4964f30c.tar.gz frameworks_base-c16889dc0034daaf50b2307c4de6c16c4964f30c.tar.bz2 |
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.
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java | 7 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/gsm/SmsMessage.java | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java index 6ae316d..d720516 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java @@ -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); diff --git a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java index d627baf..12c6b88 100644 --- a/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java +++ b/telephony/java/com/android/internal/telephony/gsm/SmsMessage.java @@ -111,6 +111,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) * +CMT: [<alpha>],<length><CR><LF><pdu> |