summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2013-07-27 09:02:14 +0200
committercodeworkx <codeworkx@cyanogenmod.org>2013-07-27 22:18:51 +0200
commitafc051f81a2392ecfc053291c19fe3feb1db77d9 (patch)
treee59071ef34c8d21a647cd5e4ba0483172e2c6a24
parent81366768f2d21bda39beb891800b16e739a0e4a0 (diff)
downloadandroid_hardware_samsung-afc051f81a2392ecfc053291c19fe3feb1db77d9.tar.gz
android_hardware_samsung-afc051f81a2392ecfc053291c19fe3feb1db77d9.tar.bz2
android_hardware_samsung-afc051f81a2392ecfc053291c19fe3feb1db77d9.zip
samsung: update libril for xmm6260
Change-Id: Ib5e68bd53fdf5d3db29ce09a975198320337cc52
-rw-r--r--ril/xmm6260/libril/Android.mk1
-rwxr-xr-xril/xmm6260/libril/ril.cpp730
-rw-r--r--ril/xmm6260/libril/ril_commands.h8
-rw-r--r--ril/xmm6260/libril/ril_event.cpp5
-rw-r--r--ril/xmm6260/libril/ril_unsol_commands.h3
5 files changed, 519 insertions, 228 deletions
diff --git a/ril/xmm6260/libril/Android.mk b/ril/xmm6260/libril/Android.mk
index 7a1131b..e3e022e 100644
--- a/ril/xmm6260/libril/Android.mk
+++ b/ril/xmm6260/libril/Android.mk
@@ -10,6 +10,7 @@ LOCAL_SRC_FILES:= \
ril_event.cpp
LOCAL_SHARED_LIBRARIES := \
+ liblog \
libutils \
libbinder \
libcutils \
diff --git a/ril/xmm6260/libril/ril.cpp b/ril/xmm6260/libril/ril.cpp
index 92b896c..871ae38 100755
--- a/ril/xmm6260/libril/ril.cpp
+++ b/ril/xmm6260/libril/ril.cpp
@@ -31,6 +31,7 @@
#include <cutils/jstring.h>
#include <sys/types.h>
+#include <sys/limits.h>
#include <pwd.h>
#include <stdio.h>
@@ -92,11 +93,11 @@ namespace android {
#define startRequest sprintf(printBuf, "(")
#define closeRequest sprintf(printBuf, "%s)", printBuf)
#define printRequest(token, req) \
- ALOGD("[%04d]> %s %s", token, requestToString(req), printBuf)
+ RLOGD("[%04d]> %s %s", token, requestToString(req), printBuf)
#define startResponse sprintf(printBuf, "%s {", printBuf)
#define closeResponse sprintf(printBuf, "%s}", printBuf)
- #define printResponse ALOGD("%s", printBuf)
+ #define printResponse RLOGD("%s", printBuf)
#define clearPrintBuf printBuf[0] = 0
#define removeLastChar printBuf[strlen(printBuf)-1] = 0
@@ -201,6 +202,9 @@ static void dispatchSIM_IO (Parcel& p, RequestInfo *pRI);
static void dispatchCallForward(Parcel& p, RequestInfo *pRI);
static void dispatchRaw(Parcel& p, RequestInfo *pRI);
static void dispatchSmsWrite (Parcel &p, RequestInfo *pRI);
+static void dispatchDataCall (Parcel& p, RequestInfo *pRI);
+static void dispatchVoiceRadioTech (Parcel& p, RequestInfo *pRI);
+static void dispatchCdmaSubscriptionSource (Parcel& p, RequestInfo *pRI);
static void dispatchCdmaSms(Parcel &p, RequestInfo *pRI);
static void dispatchCdmaSmsAck(Parcel &p, RequestInfo *pRI);
@@ -219,6 +223,7 @@ static int responseSMS(Parcel &p, void *response, size_t responselen);
static int responseSIM_IO(Parcel &p, void *response, size_t responselen);
static int responseCallForwards(Parcel &p, void *response, size_t responselen);
static int responseDataCallList(Parcel &p, void *response, size_t responselen);
+static int responseSetupDataCall(Parcel &p, void *response, size_t responselen);
static int responseRaw(Parcel &p, void *response, size_t responselen);
static int responseSsn(Parcel &p, void *response, size_t responselen);
static int responseSimStatus(Parcel &p, void *response, size_t responselen);
@@ -232,6 +237,7 @@ static int responseCallRing(Parcel &p, void *response, size_t responselen);
static int responseCdmaSignalInfoRecord(Parcel &p,void *response, size_t responselen);
static int responseCdmaCallWaiting(Parcel &p,void *response, size_t responselen);
static int responseSimRefresh(Parcel &p, void *response, size_t responselen);
+static int responseCellInfoList(Parcel &p, void *response, size_t responselen);
static int decodeVoiceRadioTechnology (RIL_RadioState radioState);
static int decodeCdmaSubscriptionSource (RIL_RadioState radioState);
@@ -330,8 +336,8 @@ issueLocalRequest(int request, void *data, int len) {
/* Hack to include Samsung requests */
if (request > 10000) {
- index = request - 10000 + RIL_REQUEST_VOICE_RADIO_TECH;
- ALOGE("SAMSUNG: request=%d, index=%d", request, index);
+ index = request - 10000 + RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE;
+ RLOGE("SAMSUNG: request=%d, index=%d", request, index);
pRI->pCI = &(s_commands[index]);
} else {
pRI->pCI = &(s_commands[request]);
@@ -346,11 +352,13 @@ issueLocalRequest(int request, void *data, int len) {
ret = pthread_mutex_unlock(&s_pendingRequestsMutex);
assert (ret == 0);
- ALOGD("C[locl]> %s", requestToString(request));
+ RLOGD("C[locl]> %s", requestToString(request));
s_callbacks.onRequest(request, data, len, pRI);
}
+
+
static int
processCommandBuffer(void *buffer, size_t buflen) {
Parcel p;
@@ -368,14 +376,14 @@ processCommandBuffer(void *buffer, size_t buflen) {
status = p.readInt32 (&token);
if (status != NO_ERROR) {
- ALOGE("invalid request block");
+ RLOGE("invalid request block");
return 0;
}
/* Hack to include Samsung requests */
//if (request < 1 || request >= (int32_t)NUM_ELEMS(s_commands)) {
- if (request < 1 || ((request > RIL_REQUEST_VOICE_RADIO_TECH) && (request < RIL_REQUEST_GET_CELL_BROADCAST_CONFIG)) || request > RIL_REQUEST_HANGUP_VT) {
- ALOGE("unsupported request code %d token %d", request, token);
+ if (request < 1 || ((request > RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE) && (request < RIL_REQUEST_GET_CELL_BROADCAST_CONFIG)) || request > RIL_REQUEST_HANGUP_VT) {
+ RLOGE("unsupported request code %d token %d", request, token);
// FIXME this should perhaps return a response
return 0;
}
@@ -386,8 +394,8 @@ processCommandBuffer(void *buffer, size_t buflen) {
/* Hack to include Samsung requests */
if (request > 10000) {
- index = request - 10000 + RIL_REQUEST_VOICE_RADIO_TECH;
- ALOGE("processCommandBuffer: samsung request=%d, index=%d", request, index);
+ index = request - 10000 + RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE;
+ RLOGE("processCommandBuffer: samsung request=%d, index=%d", request, index);
pRI->pCI = &(s_commands[index]);
} else {
pRI->pCI = &(s_commands[request]);
@@ -411,7 +419,7 @@ processCommandBuffer(void *buffer, size_t buflen) {
static void
invalidCommandBlock (RequestInfo *pRI) {
- ALOGE("invalid command block for token %d request %s",
+ RLOGE("invalid command block for token %d request %s",
pRI->token, requestToString(pRI->pCI->requestNumber));
}
@@ -721,8 +729,13 @@ invalid:
*/
static void
dispatchSIM_IO (Parcel &p, RequestInfo *pRI) {
- RIL_SIM_IO_v6 simIO;
+ union RIL_SIM_IO {
+ RIL_SIM_IO_v6 v6;
+ RIL_SIM_IO_v5 v5;
+ } simIO;
+
int32_t t;
+ int size;
status_t status;
memset (&simIO, 0, sizeof(simIO));
@@ -730,31 +743,31 @@ dispatchSIM_IO (Parcel &p, RequestInfo *pRI) {
// note we only check status at the end
status = p.readInt32(&t);
- simIO.command = (int)t;
+ simIO.v6.command = (int)t;
status = p.readInt32(&t);
- simIO.fileid = (int)t;
+ simIO.v6.fileid = (int)t;
- simIO.path = strdupReadString(p);
+ simIO.v6.path = strdupReadString(p);
status = p.readInt32(&t);
- simIO.p1 = (int)t;
+ simIO.v6.p1 = (int)t;
status = p.readInt32(&t);
- simIO.p2 = (int)t;
+ simIO.v6.p2 = (int)t;
status = p.readInt32(&t);
- simIO.p3 = (int)t;
+ simIO.v6.p3 = (int)t;
- simIO.data = strdupReadString(p);
- simIO.pin2 = strdupReadString(p);
- simIO.aidPtr = strdupReadString(p);
+ simIO.v6.data = strdupReadString(p);
+ simIO.v6.pin2 = strdupReadString(p);
+ simIO.v6.aidPtr = strdupReadString(p);
startRequest;
appendPrintBuf("%scmd=0x%X,efid=0x%X,path=%s,%d,%d,%d,%s,pin2=%s,aid=%s", printBuf,
- simIO.command, simIO.fileid, (char*)simIO.path,
- simIO.p1, simIO.p2, simIO.p3,
- (char*)simIO.data, (char*)simIO.pin2, simIO.aidPtr);
+ simIO.v6.command, simIO.v6.fileid, (char*)simIO.v6.path,
+ simIO.v6.p1, simIO.v6.p2, simIO.v6.p3,
+ (char*)simIO.v6.data, (char*)simIO.v6.pin2, simIO.v6.aidPtr);
closeRequest;
printRequest(pRI->token, pRI->pCI->requestNumber);
@@ -762,19 +775,20 @@ dispatchSIM_IO (Parcel &p, RequestInfo *pRI) {
goto invalid;
}
- s_callbacks.onRequest(pRI->pCI->requestNumber, &simIO, sizeof(simIO), pRI);
+ size = (s_callbacks.version < 6) ? sizeof(simIO.v5) : sizeof(simIO.v6);
+ s_callbacks.onRequest(pRI->pCI->requestNumber, &simIO, size, pRI);
#ifdef MEMSET_FREED
- memsetString (simIO.path);
- memsetString (simIO.data);
- memsetString (simIO.pin2);
- memsetString (simIO.aidPtr);
+ memsetString (simIO.v6.path);
+ memsetString (simIO.v6.data);
+ memsetString (simIO.v6.pin2);
+ memsetString (simIO.v6.aidPtr);
#endif
- free (simIO.path);
- free (simIO.data);
- free (simIO.pin2);
- free (simIO.aidPtr);
+ free (simIO.v6.path);
+ free (simIO.v6.data);
+ free (simIO.v6.pin2);
+ free (simIO.v6.aidPtr);
#ifdef MEMSET_FREED
memset(&simIO, 0, sizeof(simIO));
@@ -1033,49 +1047,51 @@ dispatchGsmBrSmsCnf(Parcel &p, RequestInfo *pRI) {
goto invalid;
}
- RIL_GSM_BroadcastSmsConfigInfo gsmBci[num];
- RIL_GSM_BroadcastSmsConfigInfo *gsmBciPtrs[num];
+ {
+ RIL_GSM_BroadcastSmsConfigInfo gsmBci[num];
+ RIL_GSM_BroadcastSmsConfigInfo *gsmBciPtrs[num];
- startRequest;
- for (int i = 0 ; i < num ; i++ ) {
- gsmBciPtrs[i] = &gsmBci[i];
+ startRequest;
+ for (int i = 0 ; i < num ; i++ ) {
+ gsmBciPtrs[i] = &gsmBci[i];
- status = p.readInt32(&t);
- gsmBci[i].fromServiceId = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].fromServiceId = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].toServiceId = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].toServiceId = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].fromCodeScheme = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].fromCodeScheme = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].toCodeScheme = (int) t;
+ status = p.readInt32(&t);
+ gsmBci[i].toCodeScheme = (int) t;
- status = p.readInt32(&t);
- gsmBci[i].selected = (uint8_t) t;
+ status = p.readInt32(&t);
+ gsmBci[i].selected = (uint8_t) t;
- appendPrintBuf("%s [%d: fromServiceId=%d, toServiceId =%d, \
- fromCodeScheme=%d, toCodeScheme=%d, selected =%d]", printBuf, i,
- gsmBci[i].fromServiceId, gsmBci[i].toServiceId,
- gsmBci[i].fromCodeScheme, gsmBci[i].toCodeScheme,
- gsmBci[i].selected);
- }
- closeRequest;
+ appendPrintBuf("%s [%d: fromServiceId=%d, toServiceId =%d, \
+ fromCodeScheme=%d, toCodeScheme=%d, selected =%d]", printBuf, i,
+ gsmBci[i].fromServiceId, gsmBci[i].toServiceId,
+ gsmBci[i].fromCodeScheme, gsmBci[i].toCodeScheme,
+ gsmBci[i].selected);
+ }
+ closeRequest;
- if (status != NO_ERROR) {
- goto invalid;
- }
+ if (status != NO_ERROR) {
+ goto invalid;
+ }
- s_callbacks.onRequest(pRI->pCI->requestNumber,
- gsmBciPtrs,
- num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *),
- pRI);
+ s_callbacks.onRequest(pRI->pCI->requestNumber,
+ gsmBciPtrs,
+ num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *),
+ pRI);
#ifdef MEMSET_FREED
- memset(gsmBci, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo));
- memset(gsmBciPtrs, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *));
+ memset(gsmBci, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo));
+ memset(gsmBciPtrs, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *));
#endif
+ }
return;
@@ -1095,41 +1111,43 @@ dispatchCdmaBrSmsCnf(Parcel &p, RequestInfo *pRI) {
goto invalid;
}
- RIL_CDMA_BroadcastSmsConfigInfo cdmaBci[num];
- RIL_CDMA_BroadcastSmsConfigInfo *cdmaBciPtrs[num];
+ {
+ RIL_CDMA_BroadcastSmsConfigInfo cdmaBci[num];
+ RIL_CDMA_BroadcastSmsConfigInfo *cdmaBciPtrs[num];
- startRequest;
- for (int i = 0 ; i < num ; i++ ) {
- cdmaBciPtrs[i] = &cdmaBci[i];
+ startRequest;
+ for (int i = 0 ; i < num ; i++ ) {
+ cdmaBciPtrs[i] = &cdmaBci[i];
- status = p.readInt32(&t);
- cdmaBci[i].service_category = (int) t;
+ status = p.readInt32(&t);
+ cdmaBci[i].service_category = (int) t;
- status = p.readInt32(&t);
- cdmaBci[i].language = (int) t;
+ status = p.readInt32(&t);
+ cdmaBci[i].language = (int) t;
- status = p.readInt32(&t);
- cdmaBci[i].selected = (uint8_t) t;
+ status = p.readInt32(&t);
+ cdmaBci[i].selected = (uint8_t) t;
- appendPrintBuf("%s [%d: service_category=%d, language =%d, \
- entries.bSelected =%d]", printBuf, i, cdmaBci[i].service_category,
- cdmaBci[i].language, cdmaBci[i].selected);
- }
- closeRequest;
+ appendPrintBuf("%s [%d: service_category=%d, language =%d, \
+ entries.bSelected =%d]", printBuf, i, cdmaBci[i].service_category,
+ cdmaBci[i].language, cdmaBci[i].selected);
+ }
+ closeRequest;
- if (status != NO_ERROR) {
- goto invalid;
- }
+ if (status != NO_ERROR) {
+ goto invalid;
+ }
- s_callbacks.onRequest(pRI->pCI->requestNumber,
- cdmaBciPtrs,
- num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *),
- pRI);
+ s_callbacks.onRequest(pRI->pCI->requestNumber,
+ cdmaBciPtrs,
+ num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *),
+ pRI);
#ifdef MEMSET_FREED
- memset(cdmaBci, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo));
- memset(cdmaBciPtrs, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *));
+ memset(cdmaBci, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo));
+ memset(cdmaBciPtrs, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *));
#endif
+ }
return;
@@ -1233,6 +1251,88 @@ invalid:
}
+// For backwards compatibility in RIL_REQUEST_SETUP_DATA_CALL.
+// Version 4 of the RIL interface adds a new PDP type parameter to support
+// IPv6 and dual-stack PDP contexts. When dealing with a previous version of
+// RIL, remove the parameter from the request.
+static void dispatchDataCall(Parcel& p, RequestInfo *pRI) {
+ // In RIL v3, REQUEST_SETUP_DATA_CALL takes 6 parameters.
+ const int numParamsRilV3 = 6;
+
+ // The first bytes of the RIL parcel contain the request number and the
+ // serial number - see processCommandBuffer(). Copy them over too.
+ int pos = p.dataPosition();
+
+ int numParams = p.readInt32();
+ if (s_callbacks.version < 4 && numParams > numParamsRilV3) {
+ Parcel p2;
+ p2.appendFrom(&p, 0, pos);
+ p2.writeInt32(numParamsRilV3);
+ for(int i = 0; i < numParamsRilV3; i++) {
+ p2.writeString16(p.readString16());
+ }
+ p2.setDataPosition(pos);
+ dispatchStrings(p2, pRI);
+ } else {
+ p.setDataPosition(pos);
+ dispatchStrings(p, pRI);
+ }
+}
+
+// For backwards compatibility with RILs that dont support RIL_REQUEST_VOICE_RADIO_TECH.
+// When all RILs handle this request, this function can be removed and
+// the request can be sent directly to the RIL using dispatchVoid.
+static void dispatchVoiceRadioTech(Parcel& p, RequestInfo *pRI) {
+ RIL_RadioState state = s_callbacks.onStateRequest();
+
+ if ((RADIO_STATE_UNAVAILABLE == state) || (RADIO_STATE_OFF == state)) {
+ RIL_onRequestComplete(pRI, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0);
+ }
+
+ // RILs that support RADIO_STATE_ON should support this request.
+ if (RADIO_STATE_ON == state) {
+ dispatchVoid(p, pRI);
+ return;
+ }
+
+ // For Older RILs, that do not support RADIO_STATE_ON, assume that they
+ // will not support this new request either and decode Voice Radio Technology
+ // from Radio State
+ voiceRadioTech = decodeVoiceRadioTechnology(state);
+
+ if (voiceRadioTech < 0)
+ RIL_onRequestComplete(pRI, RIL_E_GENERIC_FAILURE, NULL, 0);
+ else
+ RIL_onRequestComplete(pRI, RIL_E_SUCCESS, &voiceRadioTech, sizeof(int));
+}
+
+// For backwards compatibility in RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE:.
+// When all RILs handle this request, this function can be removed and
+// the request can be sent directly to the RIL using dispatchVoid.
+static void dispatchCdmaSubscriptionSource(Parcel& p, RequestInfo *pRI) {
+ RIL_RadioState state = s_callbacks.onStateRequest();
+
+ if ((RADIO_STATE_UNAVAILABLE == state) || (RADIO_STATE_OFF == state)) {
+ RIL_onRequestComplete(pRI, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0);
+ }
+
+ // RILs that support RADIO_STATE_ON should support this request.
+ if (RADIO_STATE_ON == state) {
+ dispatchVoid(p, pRI);
+ return;
+ }
+
+ // For Older RILs, that do not support RADIO_STATE_ON, assume that they
+ // will not support this new request either and decode CDMA Subscription Source
+ // from Radio State
+ cdmaSubscriptionSource = decodeCdmaSubscriptionSource(state);
+
+ if (cdmaSubscriptionSource < 0)
+ RIL_onRequestComplete(pRI, RIL_E_GENERIC_FAILURE, NULL, 0);
+ else
+ RIL_onRequestComplete(pRI, RIL_E_SUCCESS, &cdmaSubscriptionSource, sizeof(int));
+}
+
static int
blockingWrite(int fd, const void *buffer, size_t len) {
size_t writeOffset = 0;
@@ -1245,12 +1345,12 @@ blockingWrite(int fd, const void *buffer, size_t len) {
do {
written = write (fd, toWrite + writeOffset,
len - writeOffset);
- } while (written < 0 && errno == EINTR);
+ } while (written < 0 && ((errno == EINTR) || (errno == EAGAIN)));
if (written >= 0) {
writeOffset += written;
} else { // written < 0
- ALOGE ("RIL Response: unexpected error on write errno:%d", errno);
+ RLOGE ("RIL Response: unexpected error on write errno:%d", errno);
close(fd);
return -1;
}
@@ -1270,7 +1370,7 @@ sendResponseRaw (const void *data, size_t dataSize) {
}
if (dataSize > MAX_COMMAND_BYTES) {
- ALOGE("RIL: packet larger than %u (%u)",
+ RLOGE("RIL: packet larger than %u (%u)",
MAX_COMMAND_BYTES, (unsigned int )dataSize);
return -1;
@@ -1312,11 +1412,11 @@ responseInts(Parcel &p, void *response, size_t responselen) {
int numInts;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(int) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(int));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1343,11 +1443,11 @@ responseIntsGetPreferredNetworkType(Parcel &p, void *response, size_t responsele
int numInts;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(int) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(int));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1361,7 +1461,7 @@ responseIntsGetPreferredNetworkType(Parcel &p, void *response, size_t responsele
startResponse;
for (int i = 0 ; i < numInts ; i++) {
if (i == 0 && p_int[0] == 7) {
- ALOGE("REQUEST_GET_PREFERRED_NETWORK_TYPE: NETWORK_MODE_GLOBAL => NETWORK_MODE_WCDMA_PREF");
+ RLOGE("REQUEST_GET_PREFERRED_NETWORK_TYPE: NETWORK_MODE_GLOBAL => NETWORK_MODE_WCDMA_PREF");
p_int[0] = 0;
}
appendPrintBuf("%s%d,", printBuf, p_int[i]);
@@ -1391,11 +1491,11 @@ static int responseStringsNetworks(Parcel &p, void *response, size_t responselen
int outQANElements = 4;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(char *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(char *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1433,11 +1533,11 @@ static int responseStrings(Parcel &p, void *response, size_t responselen, bool n
int numStrings;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(char *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(char *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1487,12 +1587,12 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof (RIL_Call *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_Call *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1555,12 +1655,12 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
static int responseSMS(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_SMS_Response) ) {
- ALOGE("invalid response length %d expected %d",
+ RLOGE("invalid response length %d expected %d",
(int)responselen, (int)sizeof (RIL_SMS_Response));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1579,48 +1679,36 @@ static int responseSMS(Parcel &p, void *response, size_t responselen) {
return 0;
}
-static int responseDataCallList(Parcel &p, void *response, size_t responselen)
+static int responseDataCallListV4(Parcel &p, void *response, size_t responselen)
{
- // Write version
- p.writeInt32(s_callbacks.version);
-
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
- if (responselen % sizeof(RIL_Data_Call_Response_v6) != 0) {
- ALOGE("invalid response length %d expected multiple of %d",
- (int)responselen, (int)sizeof(RIL_Data_Call_Response_v6));
+ if (responselen % sizeof(RIL_Data_Call_Response_v4) != 0) {
+ RLOGE("invalid response length %d expected multiple of %d",
+ (int)responselen, (int)sizeof(RIL_Data_Call_Response_v4));
return RIL_ERRNO_INVALID_RESPONSE;
}
- int num = responselen / sizeof(RIL_Data_Call_Response_v6);
+ int num = responselen / sizeof(RIL_Data_Call_Response_v4);
p.writeInt32(num);
- RIL_Data_Call_Response_v6 *p_cur = (RIL_Data_Call_Response_v6 *) response;
+ RIL_Data_Call_Response_v4 *p_cur = (RIL_Data_Call_Response_v4 *) response;
startResponse;
-
- for (int i = 0; i < num; i++) {
- p.writeInt32((int)p_cur[i].status);
- p.writeInt32(p_cur[i].suggestedRetryTime);
+ int i;
+ for (i = 0; i < num; i++) {
p.writeInt32(p_cur[i].cid);
p.writeInt32(p_cur[i].active);
writeStringToParcel(p, p_cur[i].type);
- writeStringToParcel(p, p_cur[i].ifname);
- writeStringToParcel(p, p_cur[i].addresses);
- writeStringToParcel(p, p_cur[i].dnses);
- writeStringToParcel(p, p_cur[i].gateways);
- appendPrintBuf("%s[status=%d,retry=%d,cid=%d,%s,%s,%s,%s,%s,%s],", printBuf,
- p_cur[i].status,
- p_cur[i].suggestedRetryTime,
+ // apn is not used, so don't send.
+ writeStringToParcel(p, p_cur[i].address);
+ appendPrintBuf("%s[cid=%d,%s,%s,%s],", printBuf,
p_cur[i].cid,
(p_cur[i].active==0)?"down":"up",
(char*)p_cur[i].type,
- (char*)p_cur[i].ifname,
- (char*)p_cur[i].addresses,
- (char*)p_cur[i].dnses,
- (char*)p_cur[i].gateways);
+ (char*)p_cur[i].address);
}
removeLastChar;
closeResponse;
@@ -1628,9 +1716,71 @@ static int responseDataCallList(Parcel &p, void *response, size_t responselen)
return 0;
}
+static int responseDataCallList(Parcel &p, void *response, size_t responselen)
+{
+ // Write version
+ p.writeInt32(s_callbacks.version);
+
+ if (s_callbacks.version < 5) {
+ return responseDataCallListV4(p, response, responselen);
+ } else {
+ if (response == NULL && responselen != 0) {
+ RLOGE("invalid response: NULL");
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+
+ if (responselen % sizeof(RIL_Data_Call_Response_v6) != 0) {
+ RLOGE("invalid response length %d expected multiple of %d",
+ (int)responselen, (int)sizeof(RIL_Data_Call_Response_v6));
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+
+ int num = responselen / sizeof(RIL_Data_Call_Response_v6);
+ p.writeInt32(num);
+
+ RIL_Data_Call_Response_v6 *p_cur = (RIL_Data_Call_Response_v6 *) response;
+ startResponse;
+ 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);
+ writeStringToParcel(p, p_cur[i].ifname);
+ writeStringToParcel(p, p_cur[i].addresses);
+ writeStringToParcel(p, p_cur[i].dnses);
+ writeStringToParcel(p, p_cur[i].gateways);
+ appendPrintBuf("%s[status=%d,retry=%d,cid=%d,%s,%s,%s,%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].type,
+ (char*)p_cur[i].ifname,
+ (char*)p_cur[i].addresses,
+ (char*)p_cur[i].dnses,
+ (char*)p_cur[i].gateways);
+ }
+ removeLastChar;
+ closeResponse;
+ }
+
+ return 0;
+}
+
+static int responseSetupDataCall(Parcel &p, void *response, size_t responselen)
+{
+ if (s_callbacks.version < 5) {
+ return responseStringsWithVersion(s_callbacks.version, p, response, responselen);
+ } else {
+ return responseDataCallList(p, response, responselen);
+ }
+}
+
static int responseRaw(Parcel &p, void *response, size_t responselen) {
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL with responselen != 0");
+ RLOGE("invalid response: NULL with responselen != 0");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1648,12 +1798,12 @@ static int responseRaw(Parcel &p, void *response, size_t responselen) {
static int responseSIM_IO(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_SIM_IO_Response) ) {
- ALOGE("invalid response length was %d expected %d",
+ RLOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof (RIL_SIM_IO_Response));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1676,12 +1826,12 @@ static int responseCallForwards(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(RIL_CallForwardInfo *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d",
+ RLOGE("invalid response length %d expected multiple of %d",
(int)responselen, (int)sizeof(RIL_CallForwardInfo *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1714,12 +1864,12 @@ static int responseCallForwards(Parcel &p, void *response, size_t responselen) {
static int responseSsn(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof(RIL_SuppSvcNotification)) {
- ALOGE("invalid response length was %d expected %d",
+ RLOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof (RIL_SuppSvcNotification));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1745,12 +1895,12 @@ static int responseCellList(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof (RIL_NeighboringCell *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_NeighboringCell *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1794,12 +1944,12 @@ static int responseCdmaInformationRecords(Parcel &p,
RIL_CDMA_InformationRecord *infoRec;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_CDMA_InformationRecords)) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_CDMA_InformationRecords *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1819,7 +1969,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_EXTENDED_DISPLAY_INFO_REC:
if (infoRec->rec.display.alpha_len >
CDMA_ALPHA_INFO_BUFFER_LENGTH) {
- ALOGE("invalid display info response length %d \
+ RLOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.display.alpha_len,
CDMA_ALPHA_INFO_BUFFER_LENGTH);
@@ -1839,7 +1989,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC:
case RIL_CDMA_CONNECTED_NUMBER_INFO_REC:
if (infoRec->rec.number.len > CDMA_NUMBER_INFO_BUFFER_LENGTH) {
- ALOGE("invalid display info response length %d \
+ RLOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.number.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
@@ -1876,7 +2026,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_REDIRECTING_NUMBER_INFO_REC:
if (infoRec->rec.redir.redirectingNumber.len >
CDMA_NUMBER_INFO_BUFFER_LENGTH) {
- ALOGE("invalid display info response length %d \
+ RLOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.redir.redirectingNumber.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
@@ -1931,10 +2081,10 @@ static int responseCdmaInformationRecords(Parcel &p,
break;
case RIL_CDMA_T53_RELEASE_INFO_REC:
// TODO(Moto): See David Krause, he has the answer:)
- ALOGE("RIL_CDMA_T53_RELEASE_INFO_REC: return INVALID_RESPONSE");
+ RLOGE("RIL_CDMA_T53_RELEASE_INFO_REC: return INVALID_RESPONSE");
return RIL_ERRNO_INVALID_RESPONSE;
default:
- ALOGE("Incorrect name value");
+ RLOGE("Incorrect name value");
return RIL_ERRNO_INVALID_RESPONSE;
}
}
@@ -1949,33 +2099,33 @@ static int responseRilSignalStrength(Parcel &p,
int gsmSignalStrength;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
- ALOGE("responseRilSignalStrength()");
+ RLOGE("responseRilSignalStrength()");
if (responselen >= sizeof (RIL_SignalStrength_v5)) {
RIL_SignalStrength_v6 *p_cur = ((RIL_SignalStrength_v6 *) response);
/* gsmSignalStrength */
- ALOGD("gsmSignalStrength (raw)=%d", p_cur->GW_SignalStrength.signalStrength);
+ RLOGD("gsmSignalStrength (raw)=%d", p_cur->GW_SignalStrength.signalStrength);
gsmSignalStrength = p_cur->GW_SignalStrength.signalStrength & 0xFF;
- ALOGD("gsmSignalStrength (corrected)=%d", gsmSignalStrength);
+ RLOGD("gsmSignalStrength (corrected)=%d", gsmSignalStrength);
/*
* if gsmSignalStrength isn't a valid value, use cdmaDbm as fallback.
* This is needed for old modem firmwares.
*/
if (gsmSignalStrength < 0 || (gsmSignalStrength > 31 && p_cur->GW_SignalStrength.signalStrength != 99)) {
- ALOGD("gsmSignalStrength-fallback (raw)=%d", p_cur->CDMA_SignalStrength.dbm);
+ RLOGD("gsmSignalStrength-fallback (raw)=%d", p_cur->CDMA_SignalStrength.dbm);
gsmSignalStrength = p_cur->CDMA_SignalStrength.dbm;
if (gsmSignalStrength < 0) {
gsmSignalStrength = 99;
} else if (gsmSignalStrength > 31 && gsmSignalStrength != 99) {
gsmSignalStrength = 31;
}
- ALOGD("gsmSignalStrength-fallback (corrected)=%d", gsmSignalStrength);
+ RLOGD("gsmSignalStrength-fallback (corrected)=%d", gsmSignalStrength);
}
p.writeInt32(gsmSignalStrength);
@@ -2040,7 +2190,7 @@ static int responseRilSignalStrength(Parcel &p,
closeResponse;
} else {
- ALOGE("invalid response length");
+ RLOGE("invalid response length");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2057,12 +2207,12 @@ static int responseCallRing(Parcel &p, void *response, size_t responselen) {
static int responseCdmaSignalInfoRecord(Parcel &p, void *response, size_t responselen) {
if (response == NULL || responselen == 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_CDMA_SignalInfoRecord)) {
- ALOGE("invalid response length %d expected sizeof (RIL_CDMA_SignalInfoRecord) of %d\n",
+ RLOGE("invalid response length %d expected sizeof (RIL_CDMA_SignalInfoRecord) of %d\n",
(int)responselen, (int)sizeof (RIL_CDMA_SignalInfoRecord));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2087,12 +2237,12 @@ static int responseCdmaSignalInfoRecord(Parcel &p, void *response, size_t respon
static int responseCdmaCallWaiting(Parcel &p, void *response,
size_t responselen) {
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen < sizeof(RIL_CDMA_CallWaiting_v6)) {
- ALOGW("Upgrade to ril version %d\n", RIL_VERSION);
+ RLOGW("Upgrade to ril version %d\n", RIL_VERSION);
}
RIL_CDMA_CallWaiting_v6 *p_cur = ((RIL_CDMA_CallWaiting_v6 *) response);
@@ -2131,7 +2281,7 @@ static int responseCdmaCallWaiting(Parcel &p, void *response,
static int responseSimRefresh(Parcel &p, void *response, size_t responselen) {
if (response == NULL && responselen != 0) {
- ALOGE("responseSimRefresh: invalid response: NULL");
+ RLOGE("responseSimRefresh: invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2163,6 +2313,137 @@ static int responseSimRefresh(Parcel &p, void *response, size_t responselen) {
return 0;
}
+static int responseCellInfoList(Parcel &p, void *response, size_t responselen)
+{
+ if (response == NULL && responselen != 0) {
+ RLOGE("invalid response: NULL");
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+
+ if (responselen % sizeof(RIL_CellInfo) != 0) {
+ RLOGE("invalid response length %d expected multiple of %d",
+ (int)responselen, (int)sizeof(RIL_CellInfo));
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
+
+ int num = responselen / sizeof(RIL_CellInfo);
+ p.writeInt32(num);
+
+ RIL_CellInfo *p_cur = (RIL_CellInfo *) response;
+ startResponse;
+ int i;
+ for (i = 0; i < num; i++) {
+ appendPrintBuf("%s[%d: type=%d,registered=%d,timeStampType=%d,timeStamp=%lld", printBuf, i,
+ p_cur->cellInfoType, p_cur->registered, p_cur->timeStampType, p_cur->timeStamp);
+ p.writeInt32((int)p_cur->cellInfoType);
+ p.writeInt32(p_cur->registered);
+ p.writeInt32(p_cur->timeStampType);
+ p.writeInt64(p_cur->timeStamp);
+ switch(p_cur->cellInfoType) {
+ case RIL_CELL_INFO_TYPE_GSM: {
+ appendPrintBuf("%s GSM id: mcc=%d,mnc=%d,lac=%d,cid=%d,", printBuf,
+ p_cur->CellInfo.gsm.cellIdentityGsm.mcc,
+ p_cur->CellInfo.gsm.cellIdentityGsm.mnc,
+ p_cur->CellInfo.gsm.cellIdentityGsm.lac,
+ p_cur->CellInfo.gsm.cellIdentityGsm.cid);
+ appendPrintBuf("%s gsmSS: ss=%d,ber=%d],", printBuf,
+ p_cur->CellInfo.gsm.signalStrengthGsm.signalStrength,
+ p_cur->CellInfo.gsm.signalStrengthGsm.bitErrorRate);
+
+ p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.mcc);
+ p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.mnc);
+ p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.lac);
+ p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.cid);
+ p.writeInt32(p_cur->CellInfo.gsm.signalStrengthGsm.signalStrength);
+ p.writeInt32(p_cur->CellInfo.gsm.signalStrengthGsm.bitErrorRate);
+ break;
+ }
+ case RIL_CELL_INFO_TYPE_WCDMA: {
+ appendPrintBuf("%s WCDMA id: mcc=%d,mnc=%d,lac=%d,cid=%d,psc=%d,", printBuf,
+ p_cur->CellInfo.wcdma.cellIdentityWcdma.mcc,
+ p_cur->CellInfo.wcdma.cellIdentityWcdma.mnc,
+ p_cur->CellInfo.wcdma.cellIdentityWcdma.lac,
+ p_cur->CellInfo.wcdma.cellIdentityWcdma.cid,
+ p_cur->CellInfo.wcdma.cellIdentityWcdma.psc);
+ appendPrintBuf("%s wcdmaSS: ss=%d,ber=%d],", printBuf,
+ p_cur->CellInfo.wcdma.signalStrengthWcdma.signalStrength,
+ p_cur->CellInfo.wcdma.signalStrengthWcdma.bitErrorRate);
+
+ p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.mcc);
+ p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.mnc);
+ p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.lac);
+ p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.cid);
+ p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.psc);
+ p.writeInt32(p_cur->CellInfo.wcdma.signalStrengthWcdma.signalStrength);
+ p.writeInt32(p_cur->CellInfo.wcdma.signalStrengthWcdma.bitErrorRate);
+ break;
+ }
+ case RIL_CELL_INFO_TYPE_CDMA: {
+ appendPrintBuf("%s CDMA id: nId=%d,sId=%d,bsId=%d,long=%d,lat=%d", printBuf,
+ p_cur->CellInfo.cdma.cellIdentityCdma.networkId,
+ p_cur->CellInfo.cdma.cellIdentityCdma.systemId,
+ p_cur->CellInfo.cdma.cellIdentityCdma.basestationId,
+ p_cur->CellInfo.cdma.cellIdentityCdma.longitude,
+ p_cur->CellInfo.cdma.cellIdentityCdma.latitude);
+
+ p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.networkId);
+ p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.systemId);
+ p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.basestationId);
+ p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.longitude);
+ p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.latitude);
+
+ appendPrintBuf("%s cdmaSS: dbm=%d ecio=%d evdoSS: dbm=%d,ecio=%d,snr=%d", printBuf,
+ p_cur->CellInfo.cdma.signalStrengthCdma.dbm,
+ p_cur->CellInfo.cdma.signalStrengthCdma.ecio,
+ p_cur->CellInfo.cdma.signalStrengthEvdo.dbm,
+ p_cur->CellInfo.cdma.signalStrengthEvdo.ecio,
+ p_cur->CellInfo.cdma.signalStrengthEvdo.signalNoiseRatio);
+
+ p.writeInt32(p_cur->CellInfo.cdma.signalStrengthCdma.dbm);
+ p.writeInt32(p_cur->CellInfo.cdma.signalStrengthCdma.ecio);
+ p.writeInt32(p_cur->CellInfo.cdma.signalStrengthEvdo.dbm);
+ p.writeInt32(p_cur->CellInfo.cdma.signalStrengthEvdo.ecio);
+ p.writeInt32(p_cur->CellInfo.cdma.signalStrengthEvdo.signalNoiseRatio);
+ break;
+ }
+ case RIL_CELL_INFO_TYPE_LTE: {
+ appendPrintBuf("%s LTE id: mcc=%d,mnc=%d,ci=%d,pci=%d,tac=%d", printBuf,
+ p_cur->CellInfo.lte.cellIdentityLte.mcc,
+ p_cur->CellInfo.lte.cellIdentityLte.mnc,
+ p_cur->CellInfo.lte.cellIdentityLte.ci,
+ p_cur->CellInfo.lte.cellIdentityLte.pci,
+ p_cur->CellInfo.lte.cellIdentityLte.tac);
+
+ p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.mcc);
+ p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.mnc);
+ p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.ci);
+ p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.pci);
+ p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.tac);
+
+ appendPrintBuf("%s lteSS: ss=%d,rsrp=%d,rsrq=%d,rssnr=%d,cqi=%d,ta=%d", printBuf,
+ p_cur->CellInfo.lte.signalStrengthLte.signalStrength,
+ p_cur->CellInfo.lte.signalStrengthLte.rsrp,
+ p_cur->CellInfo.lte.signalStrengthLte.rsrq,
+ p_cur->CellInfo.lte.signalStrengthLte.rssnr,
+ p_cur->CellInfo.lte.signalStrengthLte.cqi,
+ p_cur->CellInfo.lte.signalStrengthLte.timingAdvance);
+ p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.signalStrength);
+ p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.rsrp);
+ p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.rsrq);
+ p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.rssnr);
+ p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.cqi);
+ p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.timingAdvance);
+ break;
+ }
+ }
+ p_cur += 1;
+ }
+ removeLastChar;
+ closeResponse;
+
+ return 0;
+}
+
static void triggerEvLoop() {
int ret;
if (!pthread_equal(pthread_self(), s_tid_dispatch)) {
@@ -2208,13 +2489,15 @@ static void sendSimStatusAppInfo(Parcel &p, int num_apps, RIL_AppStatus appStatu
}
static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
+ int i;
+
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen == sizeof (RIL_CardStatus_v6)) {
- ALOGE("RIL_CardStatus_v6");
+ RLOGE("RIL_CardStatus_v6");
RIL_CardStatus_v6 *p_cur = ((RIL_CardStatus_v6 *) response);
p.writeInt32(p_cur->card_state);
@@ -2225,7 +2508,7 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications);
} else if (responselen == sizeof (RIL_CardStatus_v5)) {
- ALOGE("RIL_CardStatus_v5");
+ RLOGE("RIL_CardStatus_v5");
RIL_CardStatus_v5 *p_cur = ((RIL_CardStatus_v5 *) response);
p.writeInt32(p_cur->card_state);
@@ -2236,10 +2519,10 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications);
} else {
- ALOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n");
- ALOGE("responselen=%d", responselen);
- ALOGE("RIL_CardStatus_v5=%d", sizeof (RIL_CardStatus_v5));
- ALOGE("RIL_CardStatus_v6=%d", sizeof (RIL_CardStatus_v6));
+ RLOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n");
+ RLOGE("responselen=%d", responselen);
+ RLOGE("RIL_CardStatus_v5=%d", sizeof (RIL_CardStatus_v5));
+ RLOGE("RIL_CardStatus_v6=%d", sizeof (RIL_CardStatus_v6));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2301,15 +2584,15 @@ static int responseCdmaSms(Parcel &p, void *response, size_t responselen) {
uint8_t uct;
void* dest;
- ALOGD("Inside responseCdmaSms");
+ RLOGD("Inside responseCdmaSms");
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof(RIL_CDMA_SMS_Message)) {
- ALOGE("invalid response length was %d expected %d",
+ RLOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof(RIL_CDMA_SMS_Message));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2361,7 +2644,7 @@ static void processWakeupCallback(int fd, short flags, void *param) {
char buff[16];
int ret;
- ALOGV("processWakeupCallback");
+ RLOGV("processWakeupCallback");
/* empty our wakeup socket out */
do {
@@ -2418,9 +2701,9 @@ static void processCommandsCallback(int fd, short flags, void *param) {
if (ret == 0 || !(errno == EAGAIN || errno == EINTR)) {
/* fatal error or end-of-stream */
if (ret != 0) {
- ALOGE("error on reading command socket errno:%d\n", errno);
+ RLOGE("error on reading command socket errno:%d\n", errno);
} else {
- ALOGW("EOS. Closing command socket.");
+ RLOGW("EOS. Closing command socket.");
}
close(s_fdCommand);
@@ -2460,11 +2743,11 @@ static void onNewCommandConnect() {
if (s_callbacks.getVersion != NULL) {
const char *version;
version = s_callbacks.getVersion();
- ALOGI("RIL Daemon version: %s\n", version);
+ RLOGI("RIL Daemon version: %s\n", version);
property_set(PROPERTY_RIL_IMPL, version);
} else {
- ALOGI("RIL Daemon version: unavailable\n");
+ RLOGI("RIL Daemon version: unavailable\n");
property_set(PROPERTY_RIL_IMPL, "unavailable");
}
@@ -2490,7 +2773,7 @@ static void listenCallback (int fd, short flags, void *param) {
s_fdCommand = accept(s_fdListen, (sockaddr *) &peeraddr, &socklen);
if (s_fdCommand < 0 ) {
- ALOGE("Error on accept() errno:%d", errno);
+ RLOGE("Error on accept() errno:%d", errno);
/* start listening for new connections again */
rilEventAddWakeup(&s_listen_event);
return;
@@ -2511,17 +2794,17 @@ static void listenCallback (int fd, short flags, void *param) {
if (strcmp(pwd->pw_name, PHONE_PROCESS) == 0) {
is_phone_socket = 1;
} else {
- ALOGE("RILD can't accept socket from process %s", pwd->pw_name);
+ RLOGE("RILD can't accept socket from process %s", pwd->pw_name);
}
} else {
- ALOGE("Error on getpwuid() errno: %d", errno);
+ RLOGE("Error on getpwuid() errno: %d", errno);
}
} else {
- ALOGD("Error on getsockopt() errno: %d", errno);
+ RLOGD("Error on getsockopt() errno: %d", errno);
}
if ( !is_phone_socket ) {
- ALOGE("RILD must accept socket from %s", PHONE_PROCESS);
+ RLOGE("RILD must accept socket from %s", PHONE_PROCESS);
close(s_fdCommand);
s_fdCommand = -1;
@@ -2537,10 +2820,10 @@ static void listenCallback (int fd, short flags, void *param) {
ret = fcntl(s_fdCommand, F_SETFL, O_NONBLOCK);
if (ret < 0) {
- ALOGE ("Error setting O_NONBLOCK errno:%d", errno);
+ RLOGE ("Error setting O_NONBLOCK errno:%d", errno);
}
- ALOGI("libril: new connection");
+ RLOGI("libril: new connection");
p_rs = record_stream_new(s_fdCommand, MAX_COMMAND_BYTES);
@@ -2577,12 +2860,12 @@ static void debugCallback (int fd, short flags, void *param) {
acceptFD = accept (fd, (sockaddr *) &peeraddr, &socklen);
if (acceptFD < 0) {
- ALOGE ("error accepting on debug port: %d\n", errno);
+ RLOGE ("error accepting on debug port: %d\n", errno);
return;
}
if (recv(acceptFD, &number, sizeof(int), 0) != sizeof(int)) {
- ALOGE ("error reading on socket: number of Args: \n");
+ RLOGE ("error reading on socket: number of Args: \n");
return;
}
args = (char **) malloc(sizeof(char*) * number);
@@ -2590,7 +2873,7 @@ static void debugCallback (int fd, short flags, void *param) {
for (int i = 0; i < number; i++) {
int len;
if (recv(acceptFD, &len, sizeof(int), 0) != sizeof(int)) {
- ALOGE ("error reading on socket: Len of Args: \n");
+ RLOGE ("error reading on socket: Len of Args: \n");
freeDebugCallbackArgs(i, args);
return;
}
@@ -2598,7 +2881,7 @@ static void debugCallback (int fd, short flags, void *param) {
args[i] = (char *) malloc((sizeof(char) * len) + 1);
if (recv(acceptFD, args[i], sizeof(char) * len, 0)
!= (int)sizeof(char) * len) {
- ALOGE ("error reading on socket: Args[%d] \n", i);
+ RLOGE ("error reading on socket: Args[%d] \n", i);
freeDebugCallbackArgs(i, args);
return;
}
@@ -2608,11 +2891,11 @@ static void debugCallback (int fd, short flags, void *param) {
switch (atoi(args[0])) {
case 0:
- ALOGI ("Connection on debug port: issuing reset.");
+ RLOGI ("Connection on debug port: issuing reset.");
issueLocalRequest(RIL_REQUEST_RESET_RADIO, NULL, 0);
break;
case 1:
- ALOGI ("Connection on debug port: issuing radio power off.");
+ RLOGI ("Connection on debug port: issuing radio power off.");
data = 0;
issueLocalRequest(RIL_REQUEST_RADIO_POWER, &data, sizeof(int));
// Close the socket
@@ -2620,12 +2903,12 @@ static void debugCallback (int fd, short flags, void *param) {
s_fdCommand = -1;
break;
case 2:
- ALOGI ("Debug port: issuing unsolicited voice network change.");
+ RLOGI ("Debug port: issuing unsolicited voice network change.");
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED,
NULL, 0);
break;
case 3:
- ALOGI ("Debug port: QXDM log enable.");
+ RLOGI ("Debug port: QXDM log enable.");
qxdm_data[0] = 65536; // head.func_tag
qxdm_data[1] = 16; // head.len
qxdm_data[2] = 1; // mode: 1 for 'start logging'
@@ -2636,7 +2919,7 @@ static void debugCallback (int fd, short flags, void *param) {
6 * sizeof(int));
break;
case 4:
- ALOGI ("Debug port: QXDM log disable.");
+ RLOGI ("Debug port: QXDM log disable.");
qxdm_data[0] = 65536;
qxdm_data[1] = 16;
qxdm_data[2] = 0; // mode: 0 for 'stop logging'
@@ -2647,7 +2930,7 @@ static void debugCallback (int fd, short flags, void *param) {
6 * sizeof(int));
break;
case 5:
- ALOGI("Debug port: Radio On");
+ RLOGI("Debug port: Radio On");
data = 1;
issueLocalRequest(RIL_REQUEST_RADIO_POWER, &data, sizeof(int));
sleep(2);
@@ -2655,33 +2938,33 @@ static void debugCallback (int fd, short flags, void *param) {
issueLocalRequest(RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC, NULL, 0);
break;
case 6:
- ALOGI("Debug port: Setup Data Call, Apn :%s\n", args[1]);
+ RLOGI("Debug port: Setup Data Call, Apn :%s\n", args[1]);
actData[0] = args[1];
issueLocalRequest(RIL_REQUEST_SETUP_DATA_CALL, &actData,
sizeof(actData));
break;
case 7:
- ALOGI("Debug port: Deactivate Data Call");
+ RLOGI("Debug port: Deactivate Data Call");
issueLocalRequest(RIL_REQUEST_DEACTIVATE_DATA_CALL, &deactData,
sizeof(deactData));
break;
case 8:
- ALOGI("Debug port: Dial Call");
+ RLOGI("Debug port: Dial Call");
dialData.clir = 0;
dialData.address = args[1];
issueLocalRequest(RIL_REQUEST_DIAL, &dialData, sizeof(dialData));
break;
case 9:
- ALOGI("Debug port: Answer Call");
+ RLOGI("Debug port: Answer Call");
issueLocalRequest(RIL_REQUEST_ANSWER, NULL, 0);
break;
case 10:
- ALOGI("Debug port: End Call");
+ RLOGI("Debug port: End Call");
issueLocalRequest(RIL_REQUEST_HANGUP, &hangupData,
sizeof(hangupData));
break;
default:
- ALOGE ("Invalid request");
+ RLOGE ("Invalid request");
break;
}
freeDebugCallbackArgs(number, args);
@@ -2723,7 +3006,7 @@ eventLoop(void *param) {
ret = pipe(filedes);
if (ret < 0) {
- ALOGE("Error in pipe() errno:%d", errno);
+ RLOGE("Error in pipe() errno:%d", errno);
return NULL;
}
@@ -2739,7 +3022,7 @@ eventLoop(void *param) {
// Only returns on error
ril_event_loop();
- ALOGE ("error in event_loop_base errno:%d", errno);
+ RLOGE ("error in event_loop_base errno:%d", errno);
// kill self to restart on error
kill(0, SIGKILL);
@@ -2766,7 +3049,7 @@ RIL_startEventLoop(void) {
pthread_mutex_unlock(&s_startupMutex);
if (ret < 0) {
- ALOGE("Failed to create dispatch thread errno:%d", errno);
+ RLOGE("Failed to create dispatch thread errno:%d", errno);
return;
}
}
@@ -2782,23 +3065,23 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
int flags;
if (callbacks == NULL) {
- ALOGE("RIL_register: RIL_RadioFunctions * null");
+ RLOGE("RIL_register: RIL_RadioFunctions * null");
return;
}
if (callbacks->version < RIL_VERSION_MIN) {
- ALOGE("RIL_register: version %d is to old, min version is %d",
+ RLOGE("RIL_register: version %d is to old, min version is %d",
callbacks->version, RIL_VERSION_MIN);
return;
}
if (callbacks->version > RIL_VERSION) {
- ALOGE("RIL_register: version %d is too new, max version is %d",
+ RLOGE("RIL_register: version %d is too new, max version is %d",
callbacks->version, RIL_VERSION);
return;
}
- ALOGE("RIL_register: RIL version %d", callbacks->version);
+ RLOGE("RIL_register: RIL version %d", callbacks->version);
if (s_registerCalled > 0) {
- ALOGE("RIL_register has been called more than once. "
+ RLOGE("RIL_register has been called more than once. "
"Subsequent call ignored");
return;
}
@@ -2832,7 +3115,7 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
if (ret < 0) {
- ALOGE("Unable to bind socket errno:%d", errno);
+ RLOGE("Unable to bind socket errno:%d", errno);
exit (-1);
}
s_fdListen = ret;
@@ -2840,14 +3123,14 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
#else
s_fdListen = android_get_control_socket(SOCKET_NAME_RIL);
if (s_fdListen < 0) {
- ALOGE("Failed to get socket '" SOCKET_NAME_RIL "'");
+ RLOGE("Failed to get socket '" SOCKET_NAME_RIL "'");
exit(-1);
}
ret = listen(s_fdListen, 4);
if (ret < 0) {
- ALOGE("Failed to listen on control socket '%d': %s",
+ RLOGE("Failed to listen on control socket '%d': %s",
s_fdListen, strerror(errno));
exit(-1);
}
@@ -2865,14 +3148,14 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
s_fdDebug = android_get_control_socket(SOCKET_NAME_RIL_DEBUG);
if (s_fdDebug < 0) {
- ALOGE("Failed to get socket '" SOCKET_NAME_RIL_DEBUG "' errno:%d", errno);
+ RLOGE("Failed to get socket '" SOCKET_NAME_RIL_DEBUG "' errno:%d", errno);
exit(-1);
}
ret = listen(s_fdDebug, 4);
if (ret < 0) {
- ALOGE("Failed to listen on ril debug socket '%d': %s",
+ RLOGE("Failed to listen on ril debug socket '%d': %s",
s_fdDebug, strerror(errno));
exit(-1);
}
@@ -2922,14 +3205,14 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel
pRI = (RequestInfo *)t;
if (!checkAndDequeueRequestInfo(pRI)) {
- ALOGE ("RIL_onRequestComplete: invalid RIL_Token");
+ RLOGE ("RIL_onRequestComplete: invalid RIL_Token");
return;
}
if (pRI->local > 0) {
// Locally issued command...void only!
// response does not go back up the command socket
- ALOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
+ RLOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
goto done;
}
@@ -2962,7 +3245,7 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel
}
if (s_fdCommand < 0) {
- ALOGD ("RIL onRequestComplete: Command channel closed");
+ RLOGD ("RIL onRequestComplete: Command channel closed");
}
sendResponse(p);
}
@@ -2989,11 +3272,11 @@ static void
wakeTimeoutCallback (void *param) {
// We're using "param != NULL" as a cancellation mechanism
if (param == NULL) {
- //ALOGD("wakeTimeout: releasing wake lock");
+ //RLOGD("wakeTimeout: releasing wake lock");
releaseWakeLock();
} else {
- //ALOGD("wakeTimeout: releasing wake lock CANCELLED");
+ //RLOGD("wakeTimeout: releasing wake lock CANCELLED");
}
}
@@ -3013,7 +3296,7 @@ decodeVoiceRadioTechnology (RIL_RadioState radioState) {
return RADIO_TECH_1xRTT;
default:
- ALOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState");
+ RLOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState");
return -1;
}
}
@@ -3034,7 +3317,7 @@ decodeCdmaSubscriptionSource (RIL_RadioState radioState) {
return CDMA_SUBSCRIPTION_SOURCE_NV;
default:
- ALOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState");
+ RLOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState");
return -1;
}
}
@@ -3053,7 +3336,7 @@ decodeSimStatus (RIL_RadioState radioState) {
case RADIO_STATE_RUIM_LOCKED_OR_ABSENT:
return radioState;
default:
- ALOGD("decodeSimStatus: Invoked with incorrect RadioState");
+ RLOGD("decodeSimStatus: Invoked with incorrect RadioState");
return -1;
}
}
@@ -3126,7 +3409,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data,
if (s_registerCalled == 0) {
// Ignore RIL_onUnsolicitedResponse before RIL_register
- ALOGW("RIL_onUnsolicitedResponse called before RIL_register");
+ RLOGW("RIL_onUnsolicitedResponse called before RIL_register");
return;
}
@@ -3134,7 +3417,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data,
if ((unsolResponseIndex < 0)
|| (unsolResponseIndex >= (int32_t)NUM_ELEMS(s_unsolResponses))) {
- ALOGE("unsupported unsolicited response code %d", unsolResponse);
+ RLOGE("unsupported unsolicited response code %d", unsolResponse);
return;
}
@@ -3279,7 +3562,7 @@ const char *
failCauseToString(RIL_Errno e) {
switch(e) {
case RIL_E_SUCCESS: return "E_SUCCESS";
- case RIL_E_RADIO_NOT_AVAILABLE: return "E_RAIDO_NOT_AVAILABLE";
+ case RIL_E_RADIO_NOT_AVAILABLE: return "E_RADIO_NOT_AVAILABLE";
case RIL_E_GENERIC_FAILURE: return "E_GENERIC_FAILURE";
case RIL_E_PASSWORD_INCORRECT: return "E_PASSWORD_INCORRECT";
case RIL_E_SIM_PIN2: return "E_SIM_PIN2";
@@ -3418,7 +3701,7 @@ requestToString(int request) {
case RIL_REQUEST_SCREEN_STATE: return "SCREEN_STATE";
case RIL_REQUEST_EXPLICIT_CALL_TRANSFER: return "EXPLICIT_CALL_TRANSFER";
case RIL_REQUEST_SET_LOCATION_UPDATES: return "SET_LOCATION_UPDATES";
- case RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE: return "CDMA_SET_SUBSCRIPTION_SOURCE";
+ case RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE:return"CDMA_SET_SUBSCRIPTION_SOURCE";
case RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE:return"CDMA_SET_ROAMING_PREFERENCE";
case RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE:return"CDMA_QUERY_ROAMING_PREFERENCE";
case RIL_REQUEST_SET_TTY_MODE:return"SET_TTY_MODE";
@@ -3434,7 +3717,7 @@ requestToString(int request) {
case RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG:return "CDMA_GET_BROADCAST_SMS_CONFIG";
case RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG:return "CDMA_SET_BROADCAST_SMS_CONFIG";
case RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION:return "CDMA_SMS_BROADCAST_ACTIVATION";
- case RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY: return "CDMA_VALIDATE_AND_WRITE_AKEY";
+ case RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY: return"CDMA_VALIDATE_AND_WRITE_AKEY";
case RIL_REQUEST_CDMA_SUBSCRIPTION: return"CDMA_SUBSCRIPTION";
case RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM: return "CDMA_WRITE_SMS_TO_RUIM";
case RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM: return "CDMA_DELETE_SMS_ON_RUIM";
@@ -3449,6 +3732,8 @@ requestToString(int request) {
case RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU: return "RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU";
case RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS: return "RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS";
case RIL_REQUEST_VOICE_RADIO_TECH: return "VOICE_RADIO_TECH";
+ case RIL_REQUEST_GET_CELL_INFO_LIST: return"GET_CELL_INFO_LIST";
+ case RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE: return"SET_UNSOL_CELL_INFO_LIST_RATE";
case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: return "UNSOL_RESPONSE_RADIO_STATE_CHANGED";
case RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED: return "UNSOL_RESPONSE_CALL_STATE_CHANGED";
case RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED: return "UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED";
@@ -3484,6 +3769,7 @@ requestToString(int request) {
case RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE: return "UNSOL_EXIT_EMERGENCY_CALLBACK_MODE";
case RIL_UNSOL_RIL_CONNECTED: return "UNSOL_RIL_CONNECTED";
case RIL_UNSOL_VOICE_RADIO_TECH_CHANGED: return "UNSOL_VOICE_RADIO_TECH_CHANGED";
+ case RIL_UNSOL_CELL_INFO_LIST: return "UNSOL_CELL_INFO_LIST";
default: return "<unknown request>";
}
}
diff --git a/ril/xmm6260/libril/ril_commands.h b/ril/xmm6260/libril/ril_commands.h
index 73aa2df..9eed3dd 100644
--- a/ril/xmm6260/libril/ril_commands.h
+++ b/ril/xmm6260/libril/ril_commands.h
@@ -41,7 +41,7 @@
{RIL_REQUEST_DTMF, dispatchString, responseVoid},
{RIL_REQUEST_SEND_SMS, dispatchStrings, responseSMS},
{RIL_REQUEST_SEND_SMS_EXPECT_MORE, dispatchStrings, responseSMS},
- {RIL_REQUEST_SETUP_DATA_CALL, dispatchStrings, responseDataCallList},
+ {RIL_REQUEST_SETUP_DATA_CALL, dispatchDataCall, responseSetupDataCall},
{RIL_REQUEST_SIM_IO, dispatchSIM_IO, responseSIM_IO},
{RIL_REQUEST_SEND_USSD, dispatchString, responseVoid},
{RIL_REQUEST_CANCEL_USSD, dispatchVoid, responseVoid},
@@ -118,11 +118,13 @@
{RIL_REQUEST_SET_SMSC_ADDRESS, dispatchString, responseVoid},
{RIL_REQUEST_REPORT_SMS_MEMORY_STATUS, dispatchInts, responseVoid},
{RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING, dispatchVoid, responseVoid},
- {RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, dispatchVoid, responseInts},
+ {RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, dispatchCdmaSubscriptionSource, responseInts},
{RIL_REQUEST_ISIM_AUTHENTICATION, dispatchString, responseString},
{RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU, dispatchStrings, responseVoid},
{RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS, dispatchString, responseSIM_IO},
- {RIL_REQUEST_VOICE_RADIO_TECH, dispatchVoid, responseInts}, // 108
+ {RIL_REQUEST_VOICE_RADIO_TECH, dispatchVoiceRadioTech, responseInts},
+ {RIL_REQUEST_GET_CELL_INFO_LIST, dispatchVoid, responseCellInfoList},
+ {RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE, dispatchInts, responseVoid}, // 110
{0, NULL, NULL}, // 10001
{RIL_REQUEST_GET_CELL_BROADCAST_CONFIG, dispatchVoid, responseVoid},
{0, NULL, NULL}, // 10003
diff --git a/ril/xmm6260/libril/ril_event.cpp b/ril/xmm6260/libril/ril_event.cpp
index b916919..9d2954e 100644
--- a/ril/xmm6260/libril/ril_event.cpp
+++ b/ril/xmm6260/libril/ril_event.cpp
@@ -75,7 +75,7 @@ static struct ril_event pending_list;
#define DEBUG 0
#if DEBUG
-#define dlog(x...) ALOGD( x )
+#define dlog(x...) RLOGD( x )
static void dump_event(struct ril_event * ev)
{
dlog("~~~~ Event %x ~~~~", (unsigned int)ev);
@@ -350,6 +350,7 @@ void ril_event_loop()
struct timeval tv;
struct timeval * ptv;
+
for (;;) {
// make local copy of read fd_set
@@ -369,7 +370,7 @@ void ril_event_loop()
if (n < 0) {
if (errno == EINTR) continue;
- ALOGE("ril_event: select error (%d)", errno);
+ RLOGE("ril_event: select error (%d)", errno);
// bail?
return;
}
diff --git a/ril/xmm6260/libril/ril_unsol_commands.h b/ril/xmm6260/libril/ril_unsol_commands.h
index 87c367e..0711225 100644
--- a/ril/xmm6260/libril/ril_unsol_commands.h
+++ b/ril/xmm6260/libril/ril_unsol_commands.h
@@ -49,4 +49,5 @@
{RIL_UNSOL_CDMA_PRL_CHANGED, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_RIL_CONNECTED, responseInts, WAKE_PARTIAL},
- {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL}
+ {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL},
+ {RIL_UNSOL_CELL_INFO_LIST, responseCellInfoList, WAKE_PARTIAL},