summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-05-05 16:18:30 -0700
committerAndroid Code Review <code-review@android.com>2010-05-05 16:18:30 -0700
commit12849c8021644b391b934af4fb9a494aab84e1ff (patch)
treea2ac75a211f7bd61d151a4813f29e0843a3bee32 /telephony/java
parent1e936da287e1836502bf91b53468076726b7e1ee (diff)
parentc16889dc0034daaf50b2307c4de6c16c4964f30c (diff)
downloadframeworks_base-12849c8021644b391b934af4fb9a494aab84e1ff.zip
frameworks_base-12849c8021644b391b934af4fb9a494aab84e1ff.tar.gz
frameworks_base-12849c8021644b391b934af4fb9a494aab84e1ff.tar.bz2
Merge "Type Zero Sms should not be displayed/stored/notified."
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java7
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/SmsMessage.java8
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: [&lt;alpha>],<length><CR><LF><pdu>