msm8974-common: libril: Change rild initial sequence to guarantee non-null function pointer before rild register its hidl service

Test: Build and local test
Bug: 78886552
Change-Id: I1137cc0f4f09f0304662a2227b84c2b5b228d45d
This commit is contained in:
terrycrhuang 2018-05-04 13:47:06 +08:00 committed by Kevin F. Haggerty
parent 7e86bb0923
commit ab269b9cd4
No known key found for this signature in database
GPG Key ID: 6D95512933112729

View File

@ -8660,6 +8660,9 @@ void radio::registerService(RIL_RadioFunctions *callbacks, CommandInfo *commands
simCount = SIM_COUNT;
#endif
s_vendorFunctions = callbacks;
s_commands = commands;
configureRpcThreadpool(1, true /* callerWillJoin */);
for (int i = 0; i < simCount; i++) {
pthread_rwlock_t *radioServiceRwlockPtr = getRadioServiceRwlock(i);
@ -8681,9 +8684,6 @@ void radio::registerService(RIL_RadioFunctions *callbacks, CommandInfo *commands
ret = pthread_rwlock_unlock(radioServiceRwlockPtr);
assert(ret == 0);
}
s_vendorFunctions = callbacks;
s_commands = commands;
}
void rilc_thread_pool() {