Add RIL_E_ILLEGAL_SIM_OR_ME error code.
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
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 185f3c0..6a1ce77 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -67,7 +67,9 @@
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 @@
* 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 @@
* 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
diff --git a/libril/ril.cpp b/libril/ril.cpp
index a7fbaa1..6edb342 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -2910,6 +2910,7 @@
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";