NATT Keepalive RIL Implementation
am: 6a8809d861
Change-Id: I45a0b877028c67914f74b1de406d42bb88c1e0ea
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..01b9db1
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,4 @@
+amitmahajan@google.com
+jackyu@google.com
+rgreenwalt@google.com
+sanketpadawe@google.com
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index df0e467..4e6aa6c 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -2401,6 +2401,7 @@
* RADIO_NOT_AVAILABLE (radio resetting)
* PASSWORD_INCORRECT
* (code is invalid)
+ * SIM_ABSENT
* INTERNAL_ERR
* NO_MEMORY
* NO_RESOURCES
@@ -2926,6 +2927,8 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * MODE_NOT_SUPPORTED
+ * SIM_ABSENT
*
* FIXME how do we specify TP-Message-Reference if we need to resend?
*/
@@ -2972,6 +2975,8 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * MODE_NOT_SUPPORTED
+ * SIM_ABSENT
*
*/
#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
@@ -3048,8 +3053,8 @@
* Other errors could include:
* RADIO_NOT_AVAILABLE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
* OP_NOT_ALLOWED_DURING_VOICE_CALL, REQUEST_NOT_SUPPORTED,
- * INVALID_ARGUMENTS, INTERNAL_ERR, NO_MEMORY, NO_RESOURCES
- * and CANCELLED
+ * INVALID_ARGUMENTS, INTERNAL_ERR, NO_MEMORY, NO_RESOURCES,
+ * SIM_ABSENT and CANCELLED
*
* See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
*/
@@ -3475,6 +3480,7 @@
* NO_MEMORY
* NO_RESOURCES
* CANCELLED
+ * SIM_ABSENT
*
* See also: RIL_REQUEST_SETUP_DATA_CALL
*/
@@ -3975,6 +3981,7 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*
* See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
*/
@@ -4144,6 +4151,7 @@
* CANCELLED
* INVALID_MODEM_STATE
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*
*/
#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
@@ -4172,6 +4180,7 @@
* CANCELLED
* INVALID_MODEM_STATE
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*
*/
#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
@@ -4801,6 +4810,8 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * MODE_NOT_SUPPORTED
+ * SIM_ABSENT
*
*/
#define RIL_REQUEST_CDMA_SEND_SMS 87
@@ -5075,6 +5086,7 @@
* CANCELLED
* INVALID_MODEM_STATE
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*
*/
#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
@@ -5103,7 +5115,7 @@
* CANCELLED
* INVALID_MODEM_STATE
* REQUEST_NOT_SUPPORTED
- *
+ * SIM_ABSENT
*/
#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
@@ -5194,6 +5206,7 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*
*/
#define RIL_REQUEST_GET_SMSC_ADDRESS 100
@@ -5220,7 +5233,7 @@
* INTERNAL_ERR
* CANCELLED
* REQUEST_NOT_SUPPORTED
- *
+ * SIM_ABSENT
*/
#define RIL_REQUEST_SET_SMSC_ADDRESS 101
@@ -5372,6 +5385,7 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*/
#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
@@ -5888,6 +5902,7 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*/
#define RIL_REQUEST_SET_DATA_PROFILE 128
@@ -5981,6 +5996,7 @@
* NO_MEMORY
* NO_RESOURCES
* CANCELLED
+ * SIM_ABSENT
*/
#define RIL_REQUEST_START_LCE 132
@@ -6001,6 +6017,7 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*/
#define RIL_REQUEST_STOP_LCE 133
@@ -6020,6 +6037,7 @@
* NO_RESOURCES
* CANCELLED
* REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
*/
#define RIL_REQUEST_PULL_LCEDATA 134
diff --git a/libril/Android.mk b/libril/Android.mk
index 5264a81..681e3c4 100644
--- a/libril/Android.mk
+++ b/libril/Android.mk
@@ -40,7 +40,6 @@
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include
LOCAL_MODULE:= libril
-LOCAL_CLANG := true
LOCAL_SANITIZE := integer
include $(BUILD_SHARED_LIBRARY)
diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c
index f451fb0..1f448f2 100644
--- a/reference-ril/reference-ril.c
+++ b/reference-ril/reference-ril.c
@@ -2840,9 +2840,9 @@
RIL_CardStatus_v6 *p_card_status = malloc(sizeof(RIL_CardStatus_v6));
p_card_status->card_state = card_state;
p_card_status->universal_pin_state = RIL_PINSTATE_UNKNOWN;
- p_card_status->gsm_umts_subscription_app_index = RIL_CARD_MAX_APPS;
- p_card_status->cdma_subscription_app_index = RIL_CARD_MAX_APPS;
- p_card_status->ims_subscription_app_index = RIL_CARD_MAX_APPS;
+ p_card_status->gsm_umts_subscription_app_index = -1;
+ p_card_status->cdma_subscription_app_index = -1;
+ p_card_status->ims_subscription_app_index = -1;
p_card_status->num_applications = num_apps;
// Initialize application status