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.
This commit is contained in:
Christian Gustafsson
2009-08-07 22:03:30 -05:00
committed by Wink Saville
parent 29b8fca9fd
commit e4ebbd29f7
2 changed files with 3 additions and 2 deletions

View File

@@ -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");
}

View File

@@ -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 " +