mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
add debug ril and fix qmuxd
This commit is contained in:
parent
8e513c0d15
commit
d3ac4c1415
10 changed files with 398 additions and 380 deletions
|
@ -47,7 +47,7 @@ void RilSapSocket::sOnRequestComplete (RIL_Token t,
|
||||||
RilSapSocket *sap_socket;
|
RilSapSocket *sap_socket;
|
||||||
SapSocketRequest *request = (SapSocketRequest*) t;
|
SapSocketRequest *request = (SapSocketRequest*) t;
|
||||||
|
|
||||||
RLOGD("Socket id:%d", request->socketId);
|
RLOGE("Socket id:%d", request->socketId);
|
||||||
|
|
||||||
sap_socket = getSocketById(request->socketId);
|
sap_socket = getSocketById(request->socketId);
|
||||||
|
|
||||||
|
@ -86,10 +86,10 @@ void RilSapSocket::sOnUnsolicitedResponse(int unsolResponse,
|
||||||
|
|
||||||
void RilSapSocket::printList() {
|
void RilSapSocket::printList() {
|
||||||
RilSapSocketList *current = head;
|
RilSapSocketList *current = head;
|
||||||
RLOGD("Printing socket list");
|
RLOGE("Printing socket list");
|
||||||
while(NULL != current) {
|
while(NULL != current) {
|
||||||
RLOGD("SocketName:%s",current->socket->name);
|
RLOGE("SocketName:%s",current->socket->name);
|
||||||
RLOGD("Socket id:%d",current->socket->id);
|
RLOGE("Socket id:%d",current->socket->id);
|
||||||
current = current->next;
|
current = current->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ RilSapSocket *RilSapSocket::getSocketById(RIL_SOCKET_ID socketId) {
|
||||||
RilSapSocket *sap_socket;
|
RilSapSocket *sap_socket;
|
||||||
RilSapSocketList *current = head;
|
RilSapSocketList *current = head;
|
||||||
|
|
||||||
RLOGD("Entered getSocketById");
|
RLOGE("Entered getSocketById");
|
||||||
printList();
|
printList();
|
||||||
|
|
||||||
while(NULL != current) {
|
while(NULL != current) {
|
||||||
|
@ -161,7 +161,7 @@ void RilSapSocket::addSocketToList(const char *socketName, RIL_SOCKET_ID socketi
|
||||||
listItem->socket = socket;
|
listItem->socket = socket;
|
||||||
listItem->next = NULL;
|
listItem->next = NULL;
|
||||||
|
|
||||||
RLOGD("Adding socket with id: %d", socket->id);
|
RLOGE("Adding socket with id: %d", socket->id);
|
||||||
|
|
||||||
if(NULL == head) {
|
if(NULL == head) {
|
||||||
head = listItem;
|
head = listItem;
|
||||||
|
|
|
@ -535,7 +535,7 @@ checkAndDequeueRequestInfoIfAck(struct RequestInfo *pRI, bool isAck) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
if (isAck) { // Async ack
|
if (isAck) { // Async ack
|
||||||
if (pRI->wasAckSent == 1) {
|
if (pRI->wasAckSent == 1) {
|
||||||
RLOGD("Ack was already sent for %s", requestToString(pRI->pCI->requestNumber));
|
RLOGE("Ack was already sent for %s", requestToString(pRI->pCI->requestNumber));
|
||||||
} else {
|
} else {
|
||||||
pRI->wasAckSent = 1;
|
pRI->wasAckSent = 1;
|
||||||
}
|
}
|
||||||
|
@ -567,7 +567,7 @@ RIL_onRequestAck(RIL_Token t) {
|
||||||
socket_id = pRI->socket_id;
|
socket_id = pRI->socket_id;
|
||||||
|
|
||||||
#if VDBG
|
#if VDBG
|
||||||
RLOGD("Request Ack, %s", rilSocketIdToString(socket_id));
|
RLOGE("Request Ack, %s", rilSocketIdToString(socket_id));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
appendPrintBuf("Ack [%04d]< %s", pRI->token, requestToString(pRI->pCI->requestNumber));
|
appendPrintBuf("Ack [%04d]< %s", pRI->token, requestToString(pRI->pCI->requestNumber));
|
||||||
|
@ -599,13 +599,13 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel
|
||||||
|
|
||||||
socket_id = pRI->socket_id;
|
socket_id = pRI->socket_id;
|
||||||
#if VDBG
|
#if VDBG
|
||||||
RLOGD("RequestComplete, %s", rilSocketIdToString(socket_id));
|
RLOGE("RequestComplete, %s", rilSocketIdToString(socket_id));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pRI->local > 0) {
|
if (pRI->local > 0) {
|
||||||
// Locally issued command...void only!
|
// Locally issued command...void only!
|
||||||
// response does not go back up the command socket
|
// response does not go back up the command socket
|
||||||
RLOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
|
RLOGE("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
|
||||||
|
|
||||||
free(pRI);
|
free(pRI);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -72,10 +72,10 @@ static struct ril_event * watch_table[MAX_FD_EVENTS];
|
||||||
static struct ril_event timer_list;
|
static struct ril_event timer_list;
|
||||||
static struct ril_event pending_list;
|
static struct ril_event pending_list;
|
||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 1
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#define dlog(x...) RLOGD( x )
|
#define dlog(x...) RLOGE( x )
|
||||||
static void dump_event(struct ril_event * ev)
|
static void dump_event(struct ril_event * ev)
|
||||||
{
|
{
|
||||||
dlog("~~~~ Event %x ~~~~", (unsigned int)ev);
|
dlog("~~~~ Event %x ~~~~", (unsigned int)ev);
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace android {
|
||||||
#define RESPONSE_UNSOLICITED_ACK_EXP 4
|
#define RESPONSE_UNSOLICITED_ACK_EXP 4
|
||||||
|
|
||||||
// Enable verbose logging
|
// Enable verbose logging
|
||||||
#define VDBG 0
|
#define VDBG 1
|
||||||
|
|
||||||
#define MIN(a,b) ((a)<(b) ? (a) : (b))
|
#define MIN(a,b) ((a)<(b) ? (a) : (b))
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -86,7 +86,7 @@ void SapImpl::checkReturnStatus(Return<void>& ret) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::setCallback(const ::android::sp<ISapCallback>& sapCallbackParam) {
|
Return<void> SapImpl::setCallback(const ::android::sp<ISapCallback>& sapCallbackParam) {
|
||||||
RLOGD("SapImpl::setCallback for slotId %d", slotId);
|
RLOGE("SapImpl::setCallback for slotId %d", slotId);
|
||||||
sapCallback = sapCallbackParam;
|
sapCallback = sapCallbackParam;
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ Return<void> SapImpl::addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqL
|
||||||
|
|
||||||
RilSapSocket *sapSocket = RilSapSocket::getSocketById(rilSocketId);
|
RilSapSocket *sapSocket = RilSapSocket::getSocketById(rilSocketId);
|
||||||
if (sapSocket) {
|
if (sapSocket) {
|
||||||
RLOGD("SapImpl::addPayloadAndDispatchRequest: calling dispatchRequest");
|
RLOGE("SapImpl::addPayloadAndDispatchRequest: calling dispatchRequest");
|
||||||
sapSocket->dispatchRequest(msg);
|
sapSocket->dispatchRequest(msg);
|
||||||
} else {
|
} else {
|
||||||
RLOGE("SapImpl::addPayloadAndDispatchRequest: sapSocket is null");
|
RLOGE("SapImpl::addPayloadAndDispatchRequest: sapSocket is null");
|
||||||
|
@ -184,7 +184,7 @@ void SapImpl::sendFailedResponse(MsgId msgId, int32_t token, int numPointers, ..
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::connectReq(int32_t token, int32_t maxMsgSize) {
|
Return<void> SapImpl::connectReq(int32_t token, int32_t maxMsgSize) {
|
||||||
RLOGD("SapImpl::connectReq");
|
RLOGE("SapImpl::connectReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_CONNECT, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_CONNECT, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::connectReq: Error allocating memory for msg");
|
RLOGE("SapImpl::connectReq: Error allocating memory for msg");
|
||||||
|
@ -212,7 +212,7 @@ Return<void> SapImpl::connectReq(int32_t token, int32_t maxMsgSize) {
|
||||||
}
|
}
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::connectReq calling pb_encode");
|
RLOGE("SapImpl::connectReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_CONNECT_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_CONNECT_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::connectReq: Error encoding RIL_SIM_SAP_CONNECT_REQ");
|
RLOGE("SapImpl::connectReq: Error encoding RIL_SIM_SAP_CONNECT_REQ");
|
||||||
sendFailedResponse(MsgId_RIL_SIM_SAP_CONNECT, token, 2, buffer, msg);
|
sendFailedResponse(MsgId_RIL_SIM_SAP_CONNECT, token, 2, buffer, msg);
|
||||||
|
@ -225,7 +225,7 @@ Return<void> SapImpl::connectReq(int32_t token, int32_t maxMsgSize) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::disconnectReq(int32_t token) {
|
Return<void> SapImpl::disconnectReq(int32_t token) {
|
||||||
RLOGD("SapImpl::disconnectReq");
|
RLOGE("SapImpl::disconnectReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_DISCONNECT, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_DISCONNECT, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::disconnectReq: Error allocating memory for msg");
|
RLOGE("SapImpl::disconnectReq: Error allocating memory for msg");
|
||||||
|
@ -253,7 +253,7 @@ Return<void> SapImpl::disconnectReq(int32_t token) {
|
||||||
|
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::disconnectReq calling pb_encode");
|
RLOGE("SapImpl::disconnectReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_DISCONNECT_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_DISCONNECT_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::disconnectReq: Error encoding RIL_SIM_SAP_DISCONNECT_REQ");
|
RLOGE("SapImpl::disconnectReq: Error encoding RIL_SIM_SAP_DISCONNECT_REQ");
|
||||||
sendFailedResponse(MsgId_RIL_SIM_SAP_DISCONNECT, token, 2, buffer, msg);
|
sendFailedResponse(MsgId_RIL_SIM_SAP_DISCONNECT, token, 2, buffer, msg);
|
||||||
|
@ -266,7 +266,7 @@ Return<void> SapImpl::disconnectReq(int32_t token) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::apduReq(int32_t token, SapApduType type, const hidl_vec<uint8_t>& command) {
|
Return<void> SapImpl::apduReq(int32_t token, SapApduType type, const hidl_vec<uint8_t>& command) {
|
||||||
RLOGD("SapImpl::apduReq");
|
RLOGE("SapImpl::apduReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_APDU, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_APDU, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::apduReq: Error allocating memory for msg");
|
RLOGE("SapImpl::apduReq: Error allocating memory for msg");
|
||||||
|
@ -306,7 +306,7 @@ Return<void> SapImpl::apduReq(int32_t token, SapApduType type, const hidl_vec<ui
|
||||||
|
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::apduReq calling pb_encode");
|
RLOGE("SapImpl::apduReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_APDU_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_APDU_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::apduReq: Error encoding RIL_SIM_SAP_APDU_REQ");
|
RLOGE("SapImpl::apduReq: Error encoding RIL_SIM_SAP_APDU_REQ");
|
||||||
sendFailedResponse(MsgId_RIL_SIM_SAP_APDU, token, 3, req.command, buffer, msg);
|
sendFailedResponse(MsgId_RIL_SIM_SAP_APDU, token, 3, req.command, buffer, msg);
|
||||||
|
@ -319,7 +319,7 @@ Return<void> SapImpl::apduReq(int32_t token, SapApduType type, const hidl_vec<ui
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::transferAtrReq(int32_t token) {
|
Return<void> SapImpl::transferAtrReq(int32_t token) {
|
||||||
RLOGD("SapImpl::transferAtrReq");
|
RLOGE("SapImpl::transferAtrReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::transferAtrReq: Error allocating memory for msg");
|
RLOGE("SapImpl::transferAtrReq: Error allocating memory for msg");
|
||||||
|
@ -348,7 +348,7 @@ Return<void> SapImpl::transferAtrReq(int32_t token) {
|
||||||
|
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::transferAtrReq calling pb_encode");
|
RLOGE("SapImpl::transferAtrReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_TRANSFER_ATR_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_TRANSFER_ATR_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::transferAtrReq: Error encoding RIL_SIM_SAP_TRANSFER_ATR_REQ");
|
RLOGE("SapImpl::transferAtrReq: Error encoding RIL_SIM_SAP_TRANSFER_ATR_REQ");
|
||||||
sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token, 2, buffer, msg);
|
sendFailedResponse(MsgId_RIL_SIM_SAP_TRANSFER_ATR, token, 2, buffer, msg);
|
||||||
|
@ -361,7 +361,7 @@ Return<void> SapImpl::transferAtrReq(int32_t token) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::powerReq(int32_t token, bool state) {
|
Return<void> SapImpl::powerReq(int32_t token, bool state) {
|
||||||
RLOGD("SapImpl::powerReq");
|
RLOGE("SapImpl::powerReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_POWER, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_POWER, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::powerReq: Error allocating memory for msg");
|
RLOGE("SapImpl::powerReq: Error allocating memory for msg");
|
||||||
|
@ -390,7 +390,7 @@ Return<void> SapImpl::powerReq(int32_t token, bool state) {
|
||||||
|
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::powerReq calling pb_encode");
|
RLOGE("SapImpl::powerReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_POWER_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_POWER_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::powerReq: Error encoding RIL_SIM_SAP_POWER_REQ");
|
RLOGE("SapImpl::powerReq: Error encoding RIL_SIM_SAP_POWER_REQ");
|
||||||
sendFailedResponse(MsgId_RIL_SIM_SAP_POWER, token, 2, buffer, msg);
|
sendFailedResponse(MsgId_RIL_SIM_SAP_POWER, token, 2, buffer, msg);
|
||||||
|
@ -403,7 +403,7 @@ Return<void> SapImpl::powerReq(int32_t token, bool state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::resetSimReq(int32_t token) {
|
Return<void> SapImpl::resetSimReq(int32_t token) {
|
||||||
RLOGD("SapImpl::resetSimReq");
|
RLOGE("SapImpl::resetSimReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_RESET_SIM, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_RESET_SIM, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::resetSimReq: Error allocating memory for msg");
|
RLOGE("SapImpl::resetSimReq: Error allocating memory for msg");
|
||||||
|
@ -431,7 +431,7 @@ Return<void> SapImpl::resetSimReq(int32_t token) {
|
||||||
|
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::resetSimReq calling pb_encode");
|
RLOGE("SapImpl::resetSimReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_RESET_SIM_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_RESET_SIM_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::resetSimReq: Error encoding RIL_SIM_SAP_RESET_SIM_REQ");
|
RLOGE("SapImpl::resetSimReq: Error encoding RIL_SIM_SAP_RESET_SIM_REQ");
|
||||||
sendFailedResponse(MsgId_RIL_SIM_SAP_RESET_SIM, token, 2, buffer, msg);
|
sendFailedResponse(MsgId_RIL_SIM_SAP_RESET_SIM, token, 2, buffer, msg);
|
||||||
|
@ -444,7 +444,7 @@ Return<void> SapImpl::resetSimReq(int32_t token) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::transferCardReaderStatusReq(int32_t token) {
|
Return<void> SapImpl::transferCardReaderStatusReq(int32_t token) {
|
||||||
RLOGD("SapImpl::transferCardReaderStatusReq");
|
RLOGE("SapImpl::transferCardReaderStatusReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::transferCardReaderStatusReq: Error allocating memory for msg");
|
RLOGE("SapImpl::transferCardReaderStatusReq: Error allocating memory for msg");
|
||||||
|
@ -474,7 +474,7 @@ Return<void> SapImpl::transferCardReaderStatusReq(int32_t token) {
|
||||||
|
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::transferCardReaderStatusReq calling pb_encode");
|
RLOGE("SapImpl::transferCardReaderStatusReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::transferCardReaderStatusReq: Error encoding "
|
RLOGE("SapImpl::transferCardReaderStatusReq: Error encoding "
|
||||||
"RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS_REQ");
|
"RIL_SIM_SAP_TRANSFER_CARD_READER_STATUS_REQ");
|
||||||
|
@ -488,7 +488,7 @@ Return<void> SapImpl::transferCardReaderStatusReq(int32_t token) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> SapImpl::setTransferProtocolReq(int32_t token, SapTransferProtocol transferProtocol) {
|
Return<void> SapImpl::setTransferProtocolReq(int32_t token, SapTransferProtocol transferProtocol) {
|
||||||
RLOGD("SapImpl::setTransferProtocolReq");
|
RLOGE("SapImpl::setTransferProtocolReq");
|
||||||
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_SET_TRANSFER_PROTOCOL, token);
|
MsgHeader *msg = createMsgHeader(MsgId_RIL_SIM_SAP_SET_TRANSFER_PROTOCOL, token);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
RLOGE("SapImpl::setTransferProtocolReq: Error allocating memory for msg");
|
RLOGE("SapImpl::setTransferProtocolReq: Error allocating memory for msg");
|
||||||
|
@ -518,7 +518,7 @@ Return<void> SapImpl::setTransferProtocolReq(int32_t token, SapTransferProtocol
|
||||||
|
|
||||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
pb_ostream_t stream = pb_ostream_from_buffer(buffer, encodedSize);
|
||||||
|
|
||||||
RLOGD("SapImpl::setTransferProtocolReq calling pb_encode");
|
RLOGE("SapImpl::setTransferProtocolReq calling pb_encode");
|
||||||
if (!pb_encode(&stream, RIL_SIM_SAP_SET_TRANSFER_PROTOCOL_REQ_fields, &req)) {
|
if (!pb_encode(&stream, RIL_SIM_SAP_SET_TRANSFER_PROTOCOL_REQ_fields, &req)) {
|
||||||
RLOGE("SapImpl::setTransferProtocolReq: Error encoding "
|
RLOGE("SapImpl::setTransferProtocolReq: Error encoding "
|
||||||
"RIL_SIM_SAP_SET_TRANSFER_PROTOCOL_REQ");
|
"RIL_SIM_SAP_SET_TRANSFER_PROTOCOL_REQ");
|
||||||
|
@ -662,7 +662,7 @@ void *sapDecodeMessage(MsgId msgId, MsgType msgType, uint8_t *payloadPtr, size_t
|
||||||
sp<SapImpl> getSapImpl(RilSapSocket *sapSocket) {
|
sp<SapImpl> getSapImpl(RilSapSocket *sapSocket) {
|
||||||
switch (sapSocket->getSocketId()) {
|
switch (sapSocket->getSocketId()) {
|
||||||
case RIL_SOCKET_1:
|
case RIL_SOCKET_1:
|
||||||
RLOGD("getSapImpl: returning sapService[0]");
|
RLOGE("getSapImpl: returning sapService[0]");
|
||||||
return sapService[0];
|
return sapService[0];
|
||||||
#if (SIM_COUNT >= 2)
|
#if (SIM_COUNT >= 2)
|
||||||
case RIL_SOCKET_2:
|
case RIL_SOCKET_2:
|
||||||
|
@ -783,14 +783,14 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RLOGD("processResponse: sapCallback != NULL; msgId = %d; msgType = %d",
|
RLOGE("processResponse: sapCallback != NULL; msgId = %d; msgType = %d",
|
||||||
msgId, msgType);
|
msgId, msgType);
|
||||||
|
|
||||||
Return<void> retStatus;
|
Return<void> retStatus;
|
||||||
switch (msgId) {
|
switch (msgId) {
|
||||||
case MsgId_RIL_SIM_SAP_CONNECT: {
|
case MsgId_RIL_SIM_SAP_CONNECT: {
|
||||||
RIL_SIM_SAP_CONNECT_RSP *connectRsp = (RIL_SIM_SAP_CONNECT_RSP *)messagePtr;
|
RIL_SIM_SAP_CONNECT_RSP *connectRsp = (RIL_SIM_SAP_CONNECT_RSP *)messagePtr;
|
||||||
RLOGD("processResponse: calling sapCallback->connectResponse %d %d %d",
|
RLOGE("processResponse: calling sapCallback->connectResponse %d %d %d",
|
||||||
rsp->token,
|
rsp->token,
|
||||||
connectRsp->response,
|
connectRsp->response,
|
||||||
connectRsp->max_message_size);
|
connectRsp->max_message_size);
|
||||||
|
@ -802,12 +802,12 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
|
|
||||||
case MsgId_RIL_SIM_SAP_DISCONNECT:
|
case MsgId_RIL_SIM_SAP_DISCONNECT:
|
||||||
if (msgType == MsgType_RESPONSE) {
|
if (msgType == MsgType_RESPONSE) {
|
||||||
RLOGD("processResponse: calling sapCallback->disconnectResponse %d", rsp->token);
|
RLOGE("processResponse: calling sapCallback->disconnectResponse %d", rsp->token);
|
||||||
retStatus = sapImpl->sapCallback->disconnectResponse(rsp->token);
|
retStatus = sapImpl->sapCallback->disconnectResponse(rsp->token);
|
||||||
} else {
|
} else {
|
||||||
RIL_SIM_SAP_DISCONNECT_IND *disconnectInd =
|
RIL_SIM_SAP_DISCONNECT_IND *disconnectInd =
|
||||||
(RIL_SIM_SAP_DISCONNECT_IND *)messagePtr;
|
(RIL_SIM_SAP_DISCONNECT_IND *)messagePtr;
|
||||||
RLOGD("processResponse: calling sapCallback->disconnectIndication %d %d",
|
RLOGE("processResponse: calling sapCallback->disconnectIndication %d %d",
|
||||||
rsp->token, disconnectInd->disconnectType);
|
rsp->token, disconnectInd->disconnectType);
|
||||||
retStatus = sapImpl->sapCallback->disconnectIndication(rsp->token,
|
retStatus = sapImpl->sapCallback->disconnectIndication(rsp->token,
|
||||||
(SapDisconnectType)disconnectInd->disconnectType);
|
(SapDisconnectType)disconnectInd->disconnectType);
|
||||||
|
@ -817,7 +817,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
case MsgId_RIL_SIM_SAP_APDU: {
|
case MsgId_RIL_SIM_SAP_APDU: {
|
||||||
RIL_SIM_SAP_APDU_RSP *apduRsp = (RIL_SIM_SAP_APDU_RSP *)messagePtr;
|
RIL_SIM_SAP_APDU_RSP *apduRsp = (RIL_SIM_SAP_APDU_RSP *)messagePtr;
|
||||||
SapResultCode apduResponse = convertApduResponseProtoToHal(apduRsp->response);
|
SapResultCode apduResponse = convertApduResponseProtoToHal(apduRsp->response);
|
||||||
RLOGD("processResponse: calling sapCallback->apduResponse %d %d",
|
RLOGE("processResponse: calling sapCallback->apduResponse %d %d",
|
||||||
rsp->token, apduResponse);
|
rsp->token, apduResponse);
|
||||||
hidl_vec<uint8_t> apduRspVec;
|
hidl_vec<uint8_t> apduRspVec;
|
||||||
if (apduRsp->apduResponse != NULL && apduRsp->apduResponse->size > 0) {
|
if (apduRsp->apduResponse != NULL && apduRsp->apduResponse->size > 0) {
|
||||||
|
@ -832,7 +832,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
(RIL_SIM_SAP_TRANSFER_ATR_RSP *)messagePtr;
|
(RIL_SIM_SAP_TRANSFER_ATR_RSP *)messagePtr;
|
||||||
SapResultCode transferAtrResponse =
|
SapResultCode transferAtrResponse =
|
||||||
convertTransferAtrResponseProtoToHal(transferAtrRsp->response);
|
convertTransferAtrResponseProtoToHal(transferAtrRsp->response);
|
||||||
RLOGD("processResponse: calling sapCallback->transferAtrResponse %d %d",
|
RLOGE("processResponse: calling sapCallback->transferAtrResponse %d %d",
|
||||||
rsp->token, transferAtrResponse);
|
rsp->token, transferAtrResponse);
|
||||||
hidl_vec<uint8_t> transferAtrRspVec;
|
hidl_vec<uint8_t> transferAtrRspVec;
|
||||||
if (transferAtrRsp->atr != NULL && transferAtrRsp->atr->size > 0) {
|
if (transferAtrRsp->atr != NULL && transferAtrRsp->atr->size > 0) {
|
||||||
|
@ -847,7 +847,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
case MsgId_RIL_SIM_SAP_POWER: {
|
case MsgId_RIL_SIM_SAP_POWER: {
|
||||||
SapResultCode powerResponse = convertPowerResponseProtoToHal(
|
SapResultCode powerResponse = convertPowerResponseProtoToHal(
|
||||||
((RIL_SIM_SAP_POWER_RSP *)messagePtr)->response);
|
((RIL_SIM_SAP_POWER_RSP *)messagePtr)->response);
|
||||||
RLOGD("processResponse: calling sapCallback->powerResponse %d %d",
|
RLOGE("processResponse: calling sapCallback->powerResponse %d %d",
|
||||||
rsp->token, powerResponse);
|
rsp->token, powerResponse);
|
||||||
retStatus = sapImpl->sapCallback->powerResponse(rsp->token, powerResponse);
|
retStatus = sapImpl->sapCallback->powerResponse(rsp->token, powerResponse);
|
||||||
break;
|
break;
|
||||||
|
@ -856,7 +856,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
case MsgId_RIL_SIM_SAP_RESET_SIM: {
|
case MsgId_RIL_SIM_SAP_RESET_SIM: {
|
||||||
SapResultCode resetSimResponse = convertResetSimResponseProtoToHal(
|
SapResultCode resetSimResponse = convertResetSimResponseProtoToHal(
|
||||||
((RIL_SIM_SAP_RESET_SIM_RSP *)messagePtr)->response);
|
((RIL_SIM_SAP_RESET_SIM_RSP *)messagePtr)->response);
|
||||||
RLOGD("processResponse: calling sapCallback->resetSimResponse %d %d",
|
RLOGE("processResponse: calling sapCallback->resetSimResponse %d %d",
|
||||||
rsp->token, resetSimResponse);
|
rsp->token, resetSimResponse);
|
||||||
retStatus = sapImpl->sapCallback->resetSimResponse(rsp->token, resetSimResponse);
|
retStatus = sapImpl->sapCallback->resetSimResponse(rsp->token, resetSimResponse);
|
||||||
break;
|
break;
|
||||||
|
@ -864,7 +864,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
|
|
||||||
case MsgId_RIL_SIM_SAP_STATUS: {
|
case MsgId_RIL_SIM_SAP_STATUS: {
|
||||||
RIL_SIM_SAP_STATUS_IND *statusInd = (RIL_SIM_SAP_STATUS_IND *)messagePtr;
|
RIL_SIM_SAP_STATUS_IND *statusInd = (RIL_SIM_SAP_STATUS_IND *)messagePtr;
|
||||||
RLOGD("processResponse: calling sapCallback->statusIndication %d %d",
|
RLOGE("processResponse: calling sapCallback->statusIndication %d %d",
|
||||||
rsp->token, statusInd->statusChange);
|
rsp->token, statusInd->statusChange);
|
||||||
retStatus = sapImpl->sapCallback->statusIndication(rsp->token,
|
retStatus = sapImpl->sapCallback->statusIndication(rsp->token,
|
||||||
(SapStatus)statusInd->statusChange);
|
(SapStatus)statusInd->statusChange);
|
||||||
|
@ -877,7 +877,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
SapResultCode transferCardReaderStatusResponse =
|
SapResultCode transferCardReaderStatusResponse =
|
||||||
convertTransferCardReaderStatusResponseProtoToHal(
|
convertTransferCardReaderStatusResponseProtoToHal(
|
||||||
transferStatusRsp->response);
|
transferStatusRsp->response);
|
||||||
RLOGD("processResponse: calling sapCallback->transferCardReaderStatusResponse %d %d %d",
|
RLOGE("processResponse: calling sapCallback->transferCardReaderStatusResponse %d %d %d",
|
||||||
rsp->token,
|
rsp->token,
|
||||||
transferCardReaderStatusResponse,
|
transferCardReaderStatusResponse,
|
||||||
transferStatusRsp->CardReaderStatus);
|
transferStatusRsp->CardReaderStatus);
|
||||||
|
@ -888,7 +888,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case MsgId_RIL_SIM_SAP_ERROR_RESP: {
|
case MsgId_RIL_SIM_SAP_ERROR_RESP: {
|
||||||
RLOGD("processResponse: calling sapCallback->errorResponse %d", rsp->token);
|
RLOGE("processResponse: calling sapCallback->errorResponse %d", rsp->token);
|
||||||
retStatus = sapImpl->sapCallback->errorResponse(rsp->token);
|
retStatus = sapImpl->sapCallback->errorResponse(rsp->token);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -901,7 +901,7 @@ void processResponse(MsgHeader *rsp, RilSapSocket *sapSocket, MsgType msgType) {
|
||||||
} else {
|
} else {
|
||||||
setTransferProtocolResponse = SapResultCode::NOT_SUPPORTED;
|
setTransferProtocolResponse = SapResultCode::NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
RLOGD("processResponse: calling sapCallback->transferProtocolResponse %d %d",
|
RLOGE("processResponse: calling sapCallback->transferProtocolResponse %d %d",
|
||||||
rsp->token, setTransferProtocolResponse);
|
rsp->token, setTransferProtocolResponse);
|
||||||
retStatus = sapImpl->sapCallback->transferProtocolResponse(rsp->token,
|
retStatus = sapImpl->sapCallback->transferProtocolResponse(rsp->token,
|
||||||
setTransferProtocolResponse);
|
setTransferProtocolResponse);
|
||||||
|
@ -958,8 +958,8 @@ void sap::registerService(RIL_RadioFunctions *callbacks) {
|
||||||
sapService[i] = new SapImpl;
|
sapService[i] = new SapImpl;
|
||||||
sapService[i]->slotId = i;
|
sapService[i]->slotId = i;
|
||||||
sapService[i]->rilSocketId = socketIds[i];
|
sapService[i]->rilSocketId = socketIds[i];
|
||||||
RLOGD("registerService: starting ISap %s for slotId %d", serviceNames[i], i);
|
RLOGE("registerService: starting ISap %s for slotId %d", serviceNames[i], i);
|
||||||
android::status_t status = sapService[i]->registerAsService(serviceNames[i]);
|
android::status_t status = sapService[i]->registerAsService(serviceNames[i]);
|
||||||
RLOGD("registerService: started ISap %s status %d", serviceNames[i], status);
|
RLOGE("registerService: started ISap %s status %d", serviceNames[i], status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -546,7 +546,7 @@ service irsc_util /system/bin/irsc_util "/etc/sec_config"
|
||||||
service mpdecision /system/bin/mpdecision --avg_comp
|
service mpdecision /system/bin/mpdecision --avg_comp
|
||||||
class main
|
class main
|
||||||
user root
|
user root
|
||||||
group system
|
oneshot
|
||||||
|
|
||||||
service qcamerasvr /system/bin/mm-qcamera-daemon
|
service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||||
class late_start
|
class late_start
|
||||||
|
@ -556,7 +556,7 @@ service qcamerasvr /system/bin/mm-qcamera-daemon
|
||||||
service qmuxd /system/bin/qmuxd
|
service qmuxd /system/bin/qmuxd
|
||||||
class main
|
class main
|
||||||
user radio
|
user radio
|
||||||
group radio audio bluetooth gps diag
|
group radio audio bluetooth gps oem_2950 diag log
|
||||||
|
|
||||||
service qseecomd /system/bin/qseecomd
|
service qseecomd /system/bin/qseecomd
|
||||||
class core
|
class core
|
||||||
|
|
|
@ -12,4 +12,9 @@ LOCAL_MODULE := libimx175_shim
|
||||||
LOCAL_SHARED_LIBRARIES := liblog
|
LOCAL_SHARED_LIBRARIES := liblog
|
||||||
LOCAL_MODULE_TAGS := optional
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := sec-ril_shim.cpp
|
||||||
|
LOCAL_MODULE := sec-ril_shim
|
||||||
|
LOCAL_SHARED_LIBRARIES := liblog
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
11
shims/sec-ril_shim.cpp
Normal file
11
shims/sec-ril_shim.cpp
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#include <cutils/log.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
int pcap_wrah(void) {
|
||||||
|
ALOGE("%s: pcap_wrap() called!\n", __func__);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -73,6 +73,8 @@ ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so
|
||||||
|
|
||||||
# Radio
|
# Radio
|
||||||
|
|
||||||
|
ro.debug_level=0x4948
|
||||||
|
|
||||||
persist.rild.nitz_plmn=""
|
persist.rild.nitz_plmn=""
|
||||||
persist.rild.nitz_long_ons_0=""
|
persist.rild.nitz_long_ons_0=""
|
||||||
persist.rild.nitz_long_ons_1=""
|
persist.rild.nitz_long_ons_1=""
|
||||||
|
|
Loading…
Reference in a new issue