diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:04:25 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:04:25 +0000 |
commit | f8a87fe5dbeef638581184663319c81d1515af72 (patch) | |
tree | 299efbccc7f71daa67253b5d436c4bcdfaeddf9e /tests/aidl_test_client_ndk_nested.cpp | |
parent | b4c7f74eef3a44858749ea3400412c7f258fe476 (diff) | |
parent | 1487d3a350538efd795d41e681242d363bdbc2f9 (diff) | |
download | aidl-android14-mainline-media-swcodec-release.tar.gz |
Snap for 10453563 from 1487d3a350538efd795d41e681242d363bdbc2f9 to mainline-media-swcodec-releaseaml_swc_341711000aml_swc_341619000aml_swc_341513600aml_swc_341312300aml_swc_341312020aml_swc_341111000aml_swc_341011020aml_swc_340922010android14-mainline-media-swcodec-release
Change-Id: I655cd9c49b13842ed88061d7531ddca96cae68f6
Diffstat (limited to 'tests/aidl_test_client_ndk_nested.cpp')
-rw-r--r-- | tests/aidl_test_client_ndk_nested.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/aidl_test_client_ndk_nested.cpp b/tests/aidl_test_client_ndk_nested.cpp index 632e5be7..686219c6 100644 --- a/tests/aidl_test_client_ndk_nested.cpp +++ b/tests/aidl_test_client_ndk_nested.cpp @@ -17,6 +17,7 @@ #include <android/binder_auto_utils.h> #include <android/binder_manager.h> #include <binder/IServiceManager.h> +#include <binder/ProcessState.h> #include <gmock/gmock.h> #include <gtest/gtest.h> #include <utils/String16.h> @@ -39,7 +40,9 @@ using testing::Optional; struct AidlTest : testing::Test { template <typename T> std::shared_ptr<T> getService() { - ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor)); + android::ProcessState::self()->setThreadPoolMaxThreadCount(1); + android::ProcessState::self()->startThreadPool(); + ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor)); return T::fromBinder(binder); } }; |