Bug 1175430 - Expose Network-Specific Error Cause for Various Error Handling in App Layer. r=btseng

--HG--
extra : histedit_source : 3458196d9d236fade4403ac1e0d2c7b37e0ce855
This commit is contained in:
younghwan.ji 2015-08-10 10:08:23 +09:00
Родитель fbd05b8eed
Коммит fb63b5e435
4 изменённых файлов: 37 добавлений и 1 удалений

Просмотреть файл

@ -62,6 +62,24 @@ ConvertErrorCodeToErrorString(int32_t aError)
case nsIMobileMessageCallback::SIM_NOT_MATCHED_ERROR:
errorStr = NS_LITERAL_STRING("SimNotMatchedError");
break;
case nsIMobileMessageCallback::NETWORK_PROBLEMS_ERROR:
errorStr = NS_LITERAL_STRING("NetworkProblemsError");
break;
case nsIMobileMessageCallback::GENERAL_PROBLEMS_ERROR:
errorStr = NS_LITERAL_STRING("GeneralProblemsError");
break;
case nsIMobileMessageCallback::SERVICE_NOT_AVAILABLE_ERROR:
errorStr = NS_LITERAL_STRING("ServiceNotAvailableError");
break;
case nsIMobileMessageCallback::MESSAGE_TOO_LONG_FOR_NETWORK_ERROR:
errorStr = NS_LITERAL_STRING("MessageTooLongForNetworkError");
break;
case nsIMobileMessageCallback::SERVICE_NOT_SUPPORTED_ERROR:
errorStr = NS_LITERAL_STRING("ServiceNotSupportedError");
break;
case nsIMobileMessageCallback::RETRY_REQUIRED_ERROR:
errorStr = NS_LITERAL_STRING("RetryRequiredError");
break;
default: // SUCCESS_NO_ERROR is handled above.
MOZ_CRASH("Should never get here!");
}

Просмотреть файл

@ -4,7 +4,7 @@
#include "nsISupports.idl"
[scriptable, uuid(609692b0-1fc7-404a-91c4-eb2ec4d16c20)]
[scriptable, uuid(19b24f93-7c02-4acf-addd-2f53bbb4e3fd)]
interface nsIMobileMessageCallback : nsISupports
{
/**
@ -24,6 +24,12 @@ interface nsIMobileMessageCallback : nsISupports
const unsigned short NON_ACTIVE_SIM_CARD_ERROR = 9;
const unsigned short STORAGE_FULL_ERROR = 10;
const unsigned short SIM_NOT_MATCHED_ERROR = 11;
const unsigned short NETWORK_PROBLEMS_ERROR = 12;
const unsigned short GENERAL_PROBLEMS_ERROR = 13;
const unsigned short SERVICE_NOT_AVAILABLE_ERROR = 14;
const unsigned short MESSAGE_TOO_LONG_FOR_NETWORK_ERROR = 15;
const unsigned short SERVICE_NOT_SUPPORTED_ERROR = 16;
const unsigned short RETRY_REQUIRED_ERROR = 17;
/**
* |message| can be nsIDOMMoz{Mms,Sms}Message.

Просмотреть файл

@ -313,6 +313,12 @@ public class GeckoSmsManager
public final static int kNonActiveSimCardError = 9;
public final static int kStorageFullError = 10;
public final static int kSimNotMatchedError = 11;
public final static int kNetworkProblemsError = 12;
public final static int kGeneralProblemsError = 13;
public final static int kServiceNotAvailableError = 14;
public final static int kMessageTooLongForNetworkError = 15;
public final static int kServiceNotSupportedError = 16;
public final static int kRetryRequiredError = 17;
private final static int kMaxMessageSize = 160;

Просмотреть файл

@ -296,6 +296,12 @@ public class GeckoSmsManager
public final static int kNonActiveSimCardError = 9;
public final static int kStorageFullError = 10;
public final static int kSimNotMatchedError = 11;
public final static int kNetworkProblemsError = 12;
public final static int kGeneralProblemsError = 13;
public final static int kServiceNotAvailableError = 14;
public final static int kMessageTooLongForNetworkError = 15;
public final static int kServiceNotSupportedError = 16;
public final static int kRetryRequiredError = 17;
private final static int kMaxMessageSize = 160;