Added additional comments to some commands for clarification.
Change RIL_UNSOL_CDMA_SUBSCRIPTION_CHANGED to
RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED.
Change-Id: Id946447c6ee9777696c3d7fa1a664ee7dc7deeba
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 73906c6..e7e2fba 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -1368,6 +1368,11 @@
* RIL_REQUEST_RADIO_POWER
*
* Toggle radio on and off (for "airplane" mode)
+ * If the radio is is turned off/on the radio modem subsystem
+ * is expected return to an initialized state. For instance,
+ * any voice and data calls will be terminated and all associated
+ * lists emptied.
+ *
* "data" is int *
* ((int *)data)[0] is > 0 for "Radio On"
* ((int *)data)[0] is == 0 for "Radio Off"
@@ -1472,7 +1477,12 @@
/**
* RIL_REQUEST_SETUP_DATA_CALL
*
- * Setup a packet data connection
+ * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
+ * return success it is added to the list of data calls and a
+ * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
+ * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
+ * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
+ * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
*
* The RIL is expected to:
* - Create one data call context.
@@ -1798,7 +1808,13 @@
/**
* RIL_REQUEST_DEACTIVATE_DATA_CALL
*
- * Deactivate packet data connection
+ * Deactivate packet data connection and remove from the
+ * data call list if SUCCESS is returned. Any other return
+ * values should also try to remove the call from the list,
+ * but that may not be possible. In any event a
+ * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
+ * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
+ * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
*
* "data" is const char **
* ((char**)data)[0] indicating CID
@@ -2173,10 +2189,10 @@
/**
* RIL_REQUEST_DATA_CALL_LIST
*
- * Queries the status of PDP contexts, returning for each
- * its CID, whether or not it is active, and its PDP type,
- * APN, and PDP adddress.
- * replaces RIL_REQUEST_PDP_CONTEXT_LIST
+ * Returns the data call list. An entry is added when a
+ * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
+ * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
+ * when RIL_REQUEST_RADIO_POWER off/on is issued.
*
* "data" is NULL
* "response" is an array of RIL_Data_Call_Response_v6
@@ -2185,6 +2201,8 @@
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
+ *
+ * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
*/
#define RIL_REQUEST_DATA_CALL_LIST 57
@@ -3330,12 +3348,12 @@
/**
* RIL_UNSOL_DATA_CALL_LIST_CHANGED
*
- * Indicate a PDP context state has changed, or a new context
- * has been activated or deactivated
- * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
- *
* "data" is an array of RIL_Data_Call_Response_v6 identical to that
- * returned by RIL_REQUEST_DATA_CALL_LIST
+ * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
+ * of current data contexts including new contexts that have been
+ * activated. A data call is only removed from this list when the
+ * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
+ * is powered off/on.
*
* See also: RIL_REQUEST_DATA_CALL_LIST
*/
@@ -3598,7 +3616,7 @@
* "data" is int *
* ((int *)data)[0] is == RIL_CdmaSubscriptionSource
*/
-#define RIL_UNSOL_CDMA_SUBSCRIPTION_CHANGED 1031
+#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
/**
* RIL_UNSOL_CDMA_PRL_CHANGED
diff --git a/libril/ril.cpp b/libril/ril.cpp
index bb53926..68046a8 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -3219,7 +3219,7 @@
case RIL_UNSOL_OEM_HOOK_RAW: return "UNSOL_OEM_HOOK_RAW";
case RIL_UNSOL_RINGBACK_TONE: return "UNSOL_RINGBACK_TONE";
case RIL_UNSOL_RESEND_INCALL_MUTE: return "UNSOL_RESEND_INCALL_MUTE";
- case RIL_UNSOL_CDMA_SUBSCRIPTION_CHANGED: return "UNSOL_CDMA_SUBSCRIPTION_CHANGED";
+ case RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED: return "UNSOL_CDMA_SUBSCRIPTION_CHANGED";
case RIL_UNSOL_CDMA_PRL_CHANGED: return "UNSOL_CDMA_PRL_CHANGED";
case RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE: return "UNSOL_EXIT_EMERGENCY_CALLBACK_MODE";
case RIL_UNSOL_RIL_CONNECTED: return "UNSOL_RIL_CONNECTED";
diff --git a/libril/ril_unsol_commands.h b/libril/ril_unsol_commands.h
index 47ae74a..ce3ef20 100644
--- a/libril/ril_unsol_commands.h
+++ b/libril/ril_unsol_commands.h
@@ -45,7 +45,7 @@
{RIL_UNSOL_OEM_HOOK_RAW, responseRaw, WAKE_PARTIAL},
{RIL_UNSOL_RINGBACK_TONE, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_RESEND_INCALL_MUTE, responseVoid, WAKE_PARTIAL},
- {RIL_UNSOL_CDMA_SUBSCRIPTION_CHANGED, responseInts, WAKE_PARTIAL},
+ {RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_CDMA_PRL_CHANGED, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_RIL_CONNECTED, responseInts, WAKE_PARTIAL}