Camera: Use default binder thread pool size
VNDK AIDL share the same thread pool as camera HAL.
Setting to a small number could result in binder
thread starvation.
Flag: EXEMPT bug-fix
Test: Vendor testing, camera VTS test
Bug: 409455147
Change-Id: Ib08244bb7e8c77245b5acec51da7cc3869968e58
diff --git a/camera/cameraserver/main_cameraserver.cpp b/camera/cameraserver/main_cameraserver.cpp
index c494732..bcaa7f1 100644
--- a/camera/cameraserver/main_cameraserver.cpp
+++ b/camera/cameraserver/main_cameraserver.cpp
@@ -18,7 +18,6 @@
//#define LOG_NDEBUG 0
#include "CameraService.h"
-#include <android/binder_process.h>
#include <hidl/HidlTransportSupport.h>
using namespace android;
@@ -30,18 +29,12 @@
// Set 5 threads for HIDL calls. Now cameraserver will serve HIDL calls.
hardware::configureRpcThreadpool(5, /*willjoin*/ false);
- // Set 5 threads for VNDK AIDL calls. Now cameraserver will serve
- // VNDK AIDL calls in addition to consuming them from the Camera HAL as well.
- ABinderProcess_setThreadPoolMaxThreadCount(5);
-
sp<ProcessState> proc(ProcessState::self());
sp<IServiceManager> sm = defaultServiceManager();
ALOGI("ServiceManager: %p", sm.get());
CameraService::instantiate();
ALOGI("ServiceManager: %p done instantiate", sm.get());
ProcessState::self()->startThreadPool();
- ABinderProcess_startThreadPool();
IPCThreadState::self()->joinThreadPool();
- ABinderProcess_joinThreadPool();
}