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
tirimbino
terrycrhuang 6 years ago committed by Stricted
parent c0b88c91d3
commit 86d49f7680
No known key found for this signature in database
GPG Key ID: 3E45BB95F7AD33DA
  1. 6
      ril/libril/ril_service.cpp

@ -8475,6 +8475,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);
@ -8495,9 +8498,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() {

Loading…
Cancel
Save