Revert "Revert "android.hardware.camera.provider@2.4: set up /dev/vndbinder""
This reverts commit e6bc6729210aa59faa7467f5e8f0844f116515be.
Test: marlin boots, camera works
Bug: 37302783
Change-Id: I73eb18d56020e345a0e2d6e90961512281de6644
diff --git a/camera/provider/2.4/default/Android.bp b/camera/provider/2.4/default/Android.bp
index 9506827..f7074ac 100644
--- a/camera/provider/2.4/default/Android.bp
+++ b/camera/provider/2.4/default/Android.bp
@@ -37,6 +37,7 @@
shared_libs: [
"libhidlbase",
"libhidltransport",
+ "libbinder",
"liblog",
"libutils",
"android.hardware.camera.device@1.0",
diff --git a/camera/provider/2.4/default/service.cpp b/camera/provider/2.4/default/service.cpp
index df2602e..7eeb637 100644
--- a/camera/provider/2.4/default/service.cpp
+++ b/camera/provider/2.4/default/service.cpp
@@ -19,11 +19,16 @@
#include <android/hardware/camera/provider/2.4/ICameraProvider.h>
#include <hidl/LegacySupport.h>
+#include <binder/ProcessState.h>
+
using android::hardware::camera::provider::V2_4::ICameraProvider;
using android::hardware::defaultPassthroughServiceImplementation;
int main()
{
ALOGI("Camera provider Service is starting.");
+ // The camera HAL may communicate to other vendor components via
+ // /dev/vndbinder
+ android::ProcessState::initWithDriver("/dev/vndbinder");
return defaultPassthroughServiceImplementation<ICameraProvider>("legacy/0", /*maxThreads*/ 6);
}