summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Kalla <mrnaveen@google.com>2017-05-12 22:31:43 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-12 22:31:43 +0000
commit45cba67df3562ada62db05daf01f64d4a3540b73 (patch)
tree99d0e2d46686cab8a926f51f261ddb60e79e81bc
parent41fb22dcb470b47f6b63ac0c9a7b4b27c7225d98 (diff)
parente6e95633a9887c66ca5da037d8d8c136976a5ede (diff)
downloadandroid_hardware_ril-45cba67df3562ada62db05daf01f64d4a3540b73.tar.gz
android_hardware_ril-45cba67df3562ada62db05daf01f64d4a3540b73.tar.bz2
android_hardware_ril-45cba67df3562ada62db05daf01f64d4a3540b73.zip
Merge "Add RIL_UNSOL_MODEM_RESTART message"
am: e6e95633a9 Change-Id: I082cb6ccf49038da6891f7293083b7af0f5e078d
-rw-r--r--include/telephony/ril.h48
-rw-r--r--libril/ril.cpp7
-rw-r--r--libril/ril_unsol_commands.h1
3 files changed, 41 insertions, 15 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 2012403..cd1084a 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -73,6 +73,7 @@ extern "C" {
* RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
*
* RIL_VERSION = 15 : New commands added:
+ * RIL_UNSOL_MODEM_RESTART,
* RIL_REQUEST_SEND_DEVICE_STATE,
* RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER,
* RIL_REQUEST_SET_SIM_CARD_POWER,
@@ -5981,20 +5982,43 @@ typedef struct {
*/
#define RIL_UNSOL_LCEDATA_RECV 1045
- /**
- * RIL_UNSOL_PCO_DATA
- *
- * Called when there is new Carrier PCO data received for a data call. Ideally
- * only new data will be forwarded, though this is not required. Multiple
- * boxes of carrier PCO data for a given call should result in a series of
- * RIL_UNSOL_PCO_DATA calls.
- *
- * "data" is the RIL_PCO_Data structure.
- *
- */
+/**
+ * RIL_UNSOL_PCO_DATA
+ *
+ * Called when there is new Carrier PCO data received for a data call. Ideally
+ * only new data will be forwarded, though this is not required. Multiple
+ * boxes of carrier PCO data for a given call should result in a series of
+ * RIL_UNSOL_PCO_DATA calls.
+ *
+ * "data" is the RIL_PCO_Data structure.
+ *
+ */
#define RIL_UNSOL_PCO_DATA 1046
/**
+ * RIL_UNSOL_MODEM_RESTART
+ *
+ * Called when there is a modem reset.
+ *
+ * "reason" is "const char *" containing the reason for the reset. It
+ * could be a crash signature if the restart was due to a crash or some
+ * string such as "user-initiated restart" or "AT command initiated
+ * restart" that explains the cause of the modem restart.
+ *
+ * When modem restarts, one of the following radio state transitions will happen
+ * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or
+ * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF
+ * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE
+ * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to
+ * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again.
+ *
+ * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the
+ * modem restart as that could be interpreted as a second modem reset by the
+ * framework.
+ */
+#define RIL_UNSOL_MODEM_RESTART 1047
+
+/**
* RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
*
* Called when the modem needs Carrier specific information that will
@@ -6003,7 +6027,7 @@ typedef struct {
* "data" is NULL
*
*/
-#define RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 1047
+#define RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 1048
/***********************************************************************/
diff --git a/libril/ril.cpp b/libril/ril.cpp
index bd5e02e..6a0f4da 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -959,7 +959,7 @@ failCauseToString(RIL_Errno e) {
case RIL_E_SIM_FULL: return "E_SIM_FULL";
case RIL_E_NETWORK_REJECT: return "E_NETWORK_REJECT";
case RIL_E_OPERATION_NOT_ALLOWED: return "E_OPERATION_NOT_ALLOWED";
- case RIL_E_EMPTY_RECORD: "E_EMPTY_RECORD";
+ case RIL_E_EMPTY_RECORD: return "E_EMPTY_RECORD";
case RIL_E_INVALID_SMS_FORMAT: return "E_INVALID_SMS_FORMAT";
case RIL_E_ENCODING_ERR: return "E_ENCODING_ERR";
case RIL_E_INVALID_SMSC_ADDRESS: return "E_INVALID_SMSC_ADDRESS";
@@ -1219,12 +1219,13 @@ requestToString(int request) {
case RIL_UNSOL_HARDWARE_CONFIG_CHANGED: return "UNSOL_HARDWARE_CONFIG_CHANGED";
case RIL_UNSOL_DC_RT_INFO_CHANGED: return "UNSOL_DC_RT_INFO_CHANGED";
case RIL_UNSOL_RADIO_CAPABILITY: return "UNSOL_RADIO_CAPABILITY";
- case RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION: return "UNSOL_CARRIER_INFO_IMSI_ENCRYPTION";
case RIL_UNSOL_ON_SS: return "UNSOL_ON_SS";
case RIL_UNSOL_STK_CC_ALPHA_NOTIFY: return "UNSOL_STK_CC_ALPHA_NOTIFY";
case RIL_UNSOL_LCEDATA_RECV: return "UNSOL_LCEDATA_RECV";
case RIL_UNSOL_PCO_DATA: return "UNSOL_PCO_DATA";
- default: return "<unknown request>";
+ case RIL_UNSOL_MODEM_RESTART: return "UNSOL_MODEM_RESTART";
+ case RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION: return "UNSOL_CARRIER_INFO_IMSI_ENCRYPTION";
+ default: return "<unknown request>";
}
}
diff --git a/libril/ril_unsol_commands.h b/libril/ril_unsol_commands.h
index 03a1c14..a551da7 100644
--- a/libril/ril_unsol_commands.h
+++ b/libril/ril_unsol_commands.h
@@ -61,4 +61,5 @@
{RIL_UNSOL_STK_CC_ALPHA_NOTIFY, radio::stkCallControlAlphaNotifyInd, WAKE_PARTIAL},
{RIL_UNSOL_LCEDATA_RECV, radio::lceDataInd, WAKE_PARTIAL},
{RIL_UNSOL_PCO_DATA, radio::pcoDataInd, WAKE_PARTIAL},
+ {RIL_UNSOL_MODEM_RESTART, radio::modemResetInd, WAKE_PARTIAL},
{RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION, radio::carrierInfoForImsiEncryption, WAKE_PARTIAL},