OSDN Git Service

Add RIL_E_ILLEGAL_SIM_OR_ME error code.
authorJohn Wang <johnwang@google.com>
Tue, 20 Apr 2010 22:11:42 +0000 (15:11 -0700)
committerJohn Wang <johnwang@google.com>
Wed, 21 Apr 2010 18:33:10 +0000 (11:33 -0700)
It is for bug 2571583 to provide better failure information of network operator selection.

Basically, network selection should return RIL_E_ILLEGAL_SIM_OR_ME when the failure is
permanent and don't need retry, such as illegal SIM, ME,  HRL config, etc.

Change-Id: Idd5337423a3772febfcfe68b4a87eb3cf5a4696e

include/telephony/ril.h
libril/ril.cpp

index 185f3c0..6a1ce77 100644 (file)
@@ -67,7 +67,9 @@ typedef enum {
     RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12,      /* fail to find CDMA subscription from specified
                                                    location */
     RIL_E_MODE_NOT_SUPPORTED = 13,              /* HW does not support preferred network type */
-    RIL_E_FDN_CHECK_FAILURE = 14                /* command failed because recipient is not on FDN list */
+    RIL_E_FDN_CHECK_FAILURE = 14,               /* command failed because recipient is not on FDN list */
+    RIL_E_ILLEGAL_SIM_OR_ME = 15                /* network selection failed due to
+                                                   illegal SIM or ME */
 } RIL_Errno;
 
 typedef enum {
@@ -1724,8 +1726,14 @@ typedef struct {
  * Valid errors:
  *  SUCCESS
  *  RADIO_NOT_AVAILABLE
+ *  ILLEGAL_SIM_OR_ME
  *  GENERIC_FAILURE
  *
+ * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
+ *       no retries needed, such as illegal SIM or ME.
+ *       Returns GENERIC_FAILURE for all other causes that might be
+ *       fixed by retries.
+ *
  */
 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
 
@@ -1743,8 +1751,14 @@ typedef struct {
  * Valid errors:
  *  SUCCESS
  *  RADIO_NOT_AVAILABLE
+ *  ILLEGAL_SIM_OR_ME
  *  GENERIC_FAILURE
  *
+ * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
+ *       no retries needed, such as illegal SIM or ME.
+ *       Returns GENERIC_FAILURE for all other causes that might be
+ *       fixed by retries.
+ *
  */
 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
 
index a7fbaa1..6edb342 100644 (file)
@@ -2910,6 +2910,7 @@ failCauseToString(RIL_Errno e) {
         case RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW: return "E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW";
         case RIL_E_SMS_SEND_FAIL_RETRY: return "E_SMS_SEND_FAIL_RETRY";
         case RIL_E_SIM_ABSENT:return "E_SIM_ABSENT";
+        case RIL_E_ILLEGAL_SIM_OR_ME:return "E_ILLEGAL_SIM_OR_ME";
 #ifdef FEATURE_MULTIMODE_ANDROID
         case RIL_E_SUBSCRIPTION_NOT_AVAILABLE:return "E_SUBSCRIPTION_NOT_AVAILABLE";
         case RIL_E_MODE_NOT_SUPPORTED:return "E_MODE_NOT_SUPPORTED";