Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fd6ad80 authored by Steven Moreland's avatar Steven Moreland
Browse files

Camera: work with vintf toggle.

Camera is currently compiled separately in passthrough and binderized
modes. Until that is resolved, adding a call to internal hidl logic.

Bug: 34817742
Test: camera starts up and works and respects binderization toggle in
both modes on marlin.
Change-Id: I20733cbc82a68a1da1c4f1b3754aef2887ca718a
parent 18b1d143
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <CameraProvider.h>

#include <hidl/HidlTransportSupport.h>
#include <hidl/LegacySupport.h>
#include <utils/StrongPointer.h>

using android::hardware::configureRpcThreadpool;
@@ -32,6 +33,11 @@ int main()
{
    const char instance[] = "legacy/0";

    // TODO(b/34817742): use defaultServicePassthroughImplementation
    // so that the toggle is implemented correctly
    using ::android::hardware::details::blockIfBinderizationDisabled;
    blockIfBinderizationDisabled(ICameraProvider::descriptor, instance);

    ALOGI("Camera provider Service is starting.");

    configureRpcThreadpool(1, true /* callerWillJoin */);