Bug 913436 - Gecko needs to return a proper error code when sending messages to non-FDN receivers. r=vicamo a=koi+

This commit is contained in:
Gene Lian 2013-09-09 21:48:07 +08:00
parent 77e05493e7
commit 4cc178f86f
5 changed files with 10 additions and 2 deletions

View File

@ -14,7 +14,7 @@ dictionary SmsThreadListItem
unsigned long long unreadCount;
};
[scriptable, uuid(399125a8-00d2-11e3-8d12-3fba4465c097)]
[scriptable, uuid(5f82f826-1956-11e3-a2bb-9b043b33de27)]
interface nsIMobileMessageCallback : nsISupports
{
/**
@ -30,6 +30,7 @@ interface nsIMobileMessageCallback : nsISupports
const unsigned short NO_SIM_CARD_ERROR = 5;
const unsigned short RADIO_DISABLED_ERROR = 6;
const unsigned short INVALID_ADDRESS_ERROR = 7;
const unsigned short FDN_CHECK_ERROR = 8;
/**
* |message| can be nsIDOMMoz{Mms,Sms}Message.

View File

@ -104,6 +104,9 @@ MobileMessageCallback::NotifyError(int32_t aError, bool aAsync)
case nsIMobileMessageCallback::INVALID_ADDRESS_ERROR:
errorStr = NS_LITERAL_STRING("InvalidAddressError");
break;
case nsIMobileMessageCallback::FDN_CHECK_ERROR:
errorStr = NS_LITERAL_STRING("FdnCheckError");
break;
default: // SUCCESS_NO_ERROR is handled above.
MOZ_CRASH("Should never get here!");
}

View File

@ -2676,6 +2676,9 @@ RadioInterface.prototype = {
case RIL.ERROR_RADIO_NOT_AVAILABLE:
error = Ci.nsIMobileMessageCallback.NO_SIGNAL_ERROR;
break;
case RIL.ERROR_FDN_CHECK_FAILURE:
error = Ci.nsIMobileMessageCallback.FDN_CHECK_ERROR;
break;
}
if (context.silent) {

View File

@ -309,6 +309,7 @@ public class GeckoSmsManager
public final static int kNoSimCardError = 5;
public final static int kRadioDisabledError = 6;
public final static int kInvalidAddressError = 7;
public final static int kFdnCheckError = 8;
private final static int kMaxMessageSize = 160;

View File

@ -303,7 +303,7 @@ public class GeckoSmsManager
public final static int kNoSimCardError = 5;
public final static int kRadioDisabledError = 6;
public final static int kInvalidAddressError = 7;
public final static int kFdnCheckError = 8;
private final static int kMaxMessageSize = 160;