diff --git a/camera/provider/2.4/default/Android.bp b/camera/provider/2.4/default/Android.bp index 627ddf40bc..bbb21c7256 100644 --- a/camera/provider/2.4/default/Android.bp +++ b/camera/provider/2.4/default/Android.bp @@ -76,7 +76,7 @@ cc_library_shared { header_libs: [ "camera.device@3.4-external-impl_headers", "camera.device@3.5-external-impl_headers", - "camera.device@3.6-external-impl_headers" + "camera.device@3.6-external-impl_headers", ], export_include_dirs: ["."], } @@ -150,6 +150,7 @@ cc_defaults { "android.hidl.memory@1.0", "libbinder", "libcamera_metadata", + "libcutils", "libhardware", "libhidlbase", "liblog", diff --git a/camera/provider/2.4/default/service.cpp b/camera/provider/2.4/default/service.cpp index 4475f7d981..84f48393fa 100644 --- a/camera/provider/2.4/default/service.cpp +++ b/camera/provider/2.4/default/service.cpp @@ -22,6 +22,8 @@ #include #include +#include +#include #include using android::status_t; @@ -41,6 +43,12 @@ int main() // The camera HAL may communicate to other vendor components via // /dev/vndbinder android::ProcessState::initWithDriver("/dev/vndbinder"); + + // b/166675194 + if (property_get_bool("ro.vendor.camera.provider24.disable_mem_init", false)) { + process_disable_memory_mitigations(); + } + status_t status; if (kLazyService) { status = defaultLazyPassthroughServiceImplementation("legacy/0",