diff options
author | terrycrhuang <terrycrhuang@google.com> | 2018-05-04 13:47:06 +0800 |
---|---|---|
committer | terrycrhuang <terrycrhuang@google.com> | 2018-05-04 13:47:06 +0800 |
commit | 456df1bf437a38bd1931da18b1322db9e792eb6a (patch) | |
tree | 043031240d12ec6ceb137c23703f4c9a3c50da6e | |
parent | ac71c57c88050f2bc46ea75320f03c62c708c91a (diff) | |
download | android_hardware_ril-456df1bf437a38bd1931da18b1322db9e792eb6a.tar.gz android_hardware_ril-456df1bf437a38bd1931da18b1322db9e792eb6a.tar.bz2 android_hardware_ril-456df1bf437a38bd1931da18b1322db9e792eb6a.zip |
ril: 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
-rw-r--r-- | libril/ril_service.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp index 47b0b9c..b8862dc 100644 --- a/libril/ril_service.cpp +++ b/libril/ril_service.cpp @@ -8500,6 +8500,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); @@ -8521,9 +8524,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() { |