Fix bug 2353510 "Sholes can't make a call from device".
Some new code in ril.cpp to handle both old and new rils
needed some tweaking so the new and old size was used.
bug: 2353510
diff --git a/libril/ril.cpp b/libril/ril.cpp
index 8c05d8c..9c5c4ec 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -571,6 +571,7 @@
dispatchDial (Parcel &p, RequestInfo *pRI) {
RIL_Dial dial;
RIL_UUS_Info uusInfo;
+ int32_t sizeOfDial;
int32_t t;
int32_t uusPresent;
status_t status;
@@ -589,6 +590,7 @@
if (s_callbacks.version < 3) { // STOP_SHIP: Remove when partners upgrade to version 3
LOGE ("dispatchDial: STOP SHIP version < 3");
uusPresent = 0;
+ sizeOfDial = sizeof(dial) - sizeof(RIL_UUS_Info *);
} else {
status = p.readInt32(&uusPresent);
@@ -625,6 +627,7 @@
uusInfo.uusLength = len;
dial.uusInfo = &uusInfo;
}
+ sizeOfDial = sizeof(dial);
}
startRequest;
@@ -637,7 +640,7 @@
closeRequest;
printRequest(pRI->token, pRI->pCI->requestNumber);
- s_callbacks.onRequest(pRI->pCI->requestNumber, &dial, sizeof(dial), pRI);
+ s_callbacks.onRequest(pRI->pCI->requestNumber, &dial, sizeOfDial, pRI);
#ifdef MEMSET_FREED
memsetString (dial.address);