From e4ebbd29f78df25e22c701b597c3c15b7f8add73 Mon Sep 17 00:00:00 2001 From: Christian Gustafsson Date: Fri, 7 Aug 2009 22:03:30 -0500 Subject: [PATCH] CDMA voicemail notification fixes 1. Convert the voicemail count of a VM notification from BCD to decimal. That way the user will not be notified of 16 new VM when there are only 10. Ref: 3GPP2 C.S0015-B / 4.5.12 Number of Messages. 2. Allow VMN-95 notifications without "User Data" to be processed. Only mandatory items for VMN-95 are "Message Identifier" and "Number of Messages". Ref: 3GPP2 C.S0015-B / 4.3.5 Voice Mail Notification. --- .../com/android/internal/telephony/cdma/CdmaSMSDispatcher.java | 3 ++- .../com/android/internal/telephony/cdma/sms/BearerData.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java index 1f1f7c14fc173..88cccd320ac8d 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java @@ -91,7 +91,8 @@ final class CdmaSMSDispatcher extends SMSDispatcher { int teleService = sms.getTeleService(); boolean handled = false; - if ((sms.getUserData() == null) && (SmsEnvelope.TELESERVICE_MWI != teleService)) { + if ((sms.getUserData() == null) && (SmsEnvelope.TELESERVICE_MWI != teleService) && + (SmsEnvelope.TELESERVICE_VMN != teleService)) { if (Config.LOGD) { Log.d(TAG, "Received SMS without user data"); } diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java index 97f92f4006359..7f3b473826a34 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/BearerData.java @@ -1106,7 +1106,7 @@ public final class BearerData { if (paramBits >= EXPECTED_PARAM_SIZE) { paramBits -= EXPECTED_PARAM_SIZE; decodeSuccess = true; - bData.numberOfMessages = inStream.read(8); + bData.numberOfMessages = IccUtils.beBcdByteToInt((byte)inStream.read(8)); } if ((! decodeSuccess) || (paramBits > 0)) { Log.d(LOG_TAG, "NUMBER_OF_MESSAGES decode " +