diff options
author | Amit Mahajan <amitmahajan@google.com> | 2016-08-25 11:19:21 -0700 |
---|---|---|
committer | Amit Mahajan <amitmahajan@google.com> | 2017-02-01 11:28:00 -0800 |
commit | cd77a5b914ec21e6914416af2adb19d76a2ebb76 (patch) | |
tree | 54de0aaa1e7e48a858b79f98ad5fd33c1d0ea963 /rild | |
parent | c8610f89450ac334e57213caa26f41cb8ddc6fa8 (diff) | |
download | android_hardware_ril-cd77a5b914ec21e6914416af2adb19d76a2ebb76.tar.gz android_hardware_ril-cd77a5b914ec21e6914416af2adb19d76a2ebb76.tar.bz2 android_hardware_ril-cd77a5b914ec21e6914416af2adb19d76a2ebb76.zip |
Adding simple radio service and callbacks.
Test: Sanity tests by telephony test team.
Bug: 32020264
Change-Id: Ib2b3abb54084a1b48c5fd74042fe534e3d9fb69f
Diffstat (limited to 'rild')
-rw-r--r-- | rild/rild.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rild/rild.c b/rild/rild.c index 56c5653..df34dc9 100644 --- a/rild/rild.c +++ b/rild/rild.c @@ -50,6 +50,7 @@ static void usage(const char *argv0) { extern char rild[MAX_SOCKET_NAME_LENGTH]; extern void RIL_register (const RIL_RadioFunctions *callbacks); +extern void rilc_thread_pool (); extern void RIL_register_socket (RIL_RadioFunctions *(*rilUimInit) (const struct RIL_Env *, int, char **), RIL_SOCKET_TYPE socketType, int argc, char **argv); @@ -142,19 +143,29 @@ void switchUser() { } int main(int argc, char **argv) { + // vendor ril lib path either passed in as -l parameter, or read from rild.libpath property const char * rilLibPath = NULL; + // ril arguments either passed in as -- parameter, or read from rild.libargs property char **rilArgv; + // handle for vendor ril lib void *dlHandle; + // Pointer to ril init function in vendor ril const RIL_RadioFunctions *(*rilInit)(const struct RIL_Env *, int, char **); + // Pointer to sap init function in vendor ril RIL_RadioFunctions *(*rilUimInit)(const struct RIL_Env *, int, char **); const char *err_str = NULL; + // functions returned by ril init function in vendor ril const RIL_RadioFunctions *funcs; + // lib path from rild.libpath property (if it's read) char libPath[PROPERTY_VALUE_MAX]; + // flat to indicate if -- parameters are present unsigned char hasLibArgs = 0; int i; + // ril/socket id received as -c parameter, otherwise set to 0 const char *clientId = NULL; + RLOGD("**RIL Daemon Started**"); RLOGD("**RILd param count=%d**", argc); @@ -261,6 +272,8 @@ int main(int argc, char **argv) { done: + rilc_thread_pool(); + RLOGD("RIL_Init starting sleep loop"); while (true) { sleep(UINT32_MAX); |