Added a special retry back-off timer value for call retry
Added suggestedRetryTime value in v6 Data_Call_Response
structure so RIL can override retry back-off time
for some special cases.
Bug: 4723641
Change-Id: If5a683be6bcc1f530f0a5512ce3012a6102393d2
diff --git a/include/telephony/ril.h b/include/telephony/ril.h
index 7bc0b4d..34f27d9 100644
--- a/include/telephony/ril.h
+++ b/include/telephony/ril.h
@@ -199,6 +199,12 @@
*/
typedef struct {
int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
+ int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
+ back-off timer value RIL wants to override the one
+ pre-configured in FW.
+ The unit is miliseconds.
+ The value < 0 means no value is suggested.
+ The value 0 means retry should be done ASAP. */
int cid; /* Context ID, uniquely identifies this call */
int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
diff --git a/libril/ril.cpp b/libril/ril.cpp
index 316bcd4..e45827a 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -1547,6 +1547,7 @@
int i;
for (i = 0; i < num; i++) {
p.writeInt32((int)p_cur[i].status);
+ p.writeInt32(p_cur[i].suggestedRetryTime);
p.writeInt32(p_cur[i].cid);
p.writeInt32(p_cur[i].active);
writeStringToParcel(p, p_cur[i].type);
@@ -1554,8 +1555,9 @@
writeStringToParcel(p, p_cur[i].addresses);
writeStringToParcel(p, p_cur[i].dnses);
writeStringToParcel(p, p_cur[i].gateways);
- appendPrintBuf("%s[status=%d,cid=%d,%s,%d,%s,%s,%s],", printBuf,
+ appendPrintBuf("%s[status=%d,retry=%d,cid=%d,%s,%d,%s,%s,%s],", printBuf,
p_cur[i].status,
+ p_cur[i].suggestedRetryTime,
p_cur[i].cid,
(p_cur[i].active==0)?"down":"up",
(char*)p_cur[i].ifname,