* </ul>
*/
class RilSapSocket : public RilSocket {
- /**
- * Function pointer to the ril initialization funtion.
- *
- * @param Ril environment variable with place request and
- * response handlers and timeout handler.
- *
- * @param Number of arguements for the initialization function.
- *
- * @param Arguements to the initialization function used to
- * generate instance id of the ril daemon.
- *
- * @return Radio functions with handlers for onRequest, onStateRequest,
- * supports, onCancel and getVersion.
- */
- RIL_RadioFunctions *(*UimInit)(const struct RIL_Env *, int argc, char **argv);
-
/**
* Place holder for the radio functions returned by the initialization
* function. Currenty only onRequest handler is being used.
static int s_registerCalled = 0;
static pthread_t s_tid_dispatch;
-static pthread_t s_tid_reader;
static int s_started = 0;
-static int s_fdDebug = -1;
-static int s_fdDebug_socket2 = -1;
-
static int s_fdWakeupRead;
static int s_fdWakeupWrite;
static struct ril_event s_wakeupfd_event;
static pthread_mutex_t s_pendingRequestsMutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t s_writeMutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t s_wakeLockCountMutex = PTHREAD_MUTEX_INITIALIZER;
static RequestInfo *s_pendingRequests = NULL;
#if (SIM_COUNT >= 2)
static pthread_mutex_t s_pendingRequestsMutex_socket2 = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t s_writeMutex_socket2 = PTHREAD_MUTEX_INITIALIZER;
static RequestInfo *s_pendingRequests_socket2 = NULL;
#endif
#if (SIM_COUNT >= 3)
static pthread_mutex_t s_pendingRequestsMutex_socket3 = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t s_writeMutex_socket3 = PTHREAD_MUTEX_INITIALIZER;
static RequestInfo *s_pendingRequests_socket3 = NULL;
#endif
#if (SIM_COUNT >= 4)
static pthread_mutex_t s_pendingRequestsMutex_socket4 = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t s_writeMutex_socket4 = PTHREAD_MUTEX_INITIALIZER;
static RequestInfo *s_pendingRequests_socket4 = NULL;
#endif
-static struct ril_event s_wake_timeout_event;
-static struct ril_event s_debug_event;
-
-
static const struct timeval TIMEVAL_WAKE_TIMEOUT = {ANDROID_WAKE_LOCK_SECS,ANDROID_WAKE_LOCK_USECS};
static pthread_mutex_t s_startupMutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t s_startupCond = PTHREAD_COND_INITIALIZER;
-static pthread_mutex_t s_dispatchMutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t s_dispatchCond = PTHREAD_COND_INITIALIZER;
-
-static RequestInfo *s_toDispatchHead = NULL;
-static RequestInfo *s_toDispatchTail = NULL;
-
static UserCallbackInfo *s_last_wake_timeout_info = NULL;
static void *s_lastNITZTimeData = NULL;
extern "C" void
RIL_register (const RIL_RadioFunctions *callbacks) {
- int ret;
- int flags;
-
RLOGI("SIM_COUNT: %d", SIM_COUNT);
if (callbacks == NULL) {
extern "C" void
RIL_onRequestAck(RIL_Token t) {
RequestInfo *pRI;
- int ret;
- size_t errorOffset;
RIL_SOCKET_ID socket_id = RIL_SOCKET_1;
pRI = (RequestInfo *)t;
RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responselen) {
RequestInfo *pRI;
int ret;
- size_t errorOffset;
RIL_SOCKET_ID socket_id = RIL_SOCKET_1;
pRI = (RequestInfo *)t;
RIL_SMS_WriteArgs args;
args.status = (int) smsWriteArgs.status;
- int len;
if (!copyHidlStringToRil(&args.pdu, smsWriteArgs.pdu, pRI)) {
return Void();
}
pf.authContext = authContext;
- int len;
if (!copyHidlStringToRil(&pf.authData, authData, pRI)) {
return Void();
}
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
bool manual = false;
- int serviceClass;
if (response == NULL || responseLen % sizeof(int) != 0) {
RLOGE("getNetworkSelectionModeResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
RadioResponseInfo responseInfo = {};
populateResponseInfo(responseInfo, serial, responseType, e);
bool enable = false;
- int serviceClass;
if (response == NULL || responseLen % sizeof(int) != 0) {
RLOGE("getMuteResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;