From 47915cf6f717817304b6579453d962a4ff488658 Mon Sep 17 00:00:00 2001 From: aosp-builder Date: Sun, 6 Sep 2026 21:44:22 +0000 Subject: [PATCH 1/7] camera: mark libcamera_client vendor_available for legacy pre-Treble HAL device/asus/flo camera/QCamera2/HAL{,3} link libcamera_client directly (Camera.h, CameraMetadata.h, CameraParameters.h, ICamera.h) -- a real, structural dependency from this old pre-Treble camera HAL architecture, not a small shimmable one. Additive change: creates a vendor-visible variant alongside the existing platform one, does not remove anything. --- camera/Android.bp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/camera/Android.bp b/camera/Android.bp index 8f732d0781e..d0836b1ee83 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -70,6 +70,10 @@ cc_library_headers { cc_library { name: "libcamera_client", defaults: ["camera_parameter_library_defaults"], + // Legacy (pre-Treble) vendor camera HALs (device/asus/flo) link this + // directly -- see project README/lineage-21 notes. Additive: does not + // remove the existing platform variant. + vendor_available: true, aidl: { export_aidl_headers: true, From 610d0906ec860c8f9f847cf080159778bac5afa4 Mon Sep 17 00:00:00 2001 From: aosp-builder Date: Sun, 6 Sep 2026 21:58:36 +0000 Subject: [PATCH 2/7] camera: mark libcamera_parameters, camera_platform_flags_c_lib vendor_available Continuing the vendor_available cascade from libcamera_client (needed by the legacy device/asus/flo camera HAL). libcamera_parameters has no dependencies of its own. camera_platform_flags_c_lib is an aconfig- generated flags library; its container:system setting is about runtime flag-storage placement, a separate concern from the build-time Soong vendor-variant this fixes. --- camera/Android.bp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/camera/Android.bp b/camera/Android.bp index d0836b1ee83..73aa36fb8fe 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -55,6 +55,7 @@ cc_aconfig_library { name: "camera_platform_flags_c_lib", aconfig_declarations: "camera_platform_flags", host_supported: true, + vendor_available: true, } java_aconfig_library { @@ -169,6 +170,7 @@ cc_library_host_static { cc_library_static { name: "libcamera_parameters", + vendor_available: true, export_include_dirs: [ "include", From 29d7cf52408df2edff9d59a7fba7e6701964e8c0 Mon Sep 17 00:00:00 2001 From: aosp-builder Date: Sun, 6 Sep 2026 22:04:25 +0000 Subject: [PATCH 3/7] camera: mark libcamera_client double_loadable libmediandk (NDK-facing) also links libcamera_client, requiring it be safe to load into both vendor and platform process address spaces simultaneously. --- camera/Android.bp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/camera/Android.bp b/camera/Android.bp index 73aa36fb8fe..bd4597724e9 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -75,6 +75,10 @@ cc_library { // directly -- see project README/lineage-21 notes. Additive: does not // remove the existing platform variant. vendor_available: true, + // libmediandk (an NDK-facing library) also links this, so it must be + // safe to load into both vendor and platform process address spaces + // simultaneously. + double_loadable: true, aidl: { export_aidl_headers: true, From a944c2f6795733fa4dbb9bdd026e674b6f3b5f36 Mon Sep 17 00:00:00 2001 From: aosp-builder Date: Sun, 6 Sep 2026 22:10:08 +0000 Subject: [PATCH 4/7] camera: mark camera_platform_flags_c_lib double_loadable Continuing the double_loadable cascade from libcamera_client. --- camera/Android.bp | 1 + 1 file changed, 1 insertion(+) diff --git a/camera/Android.bp b/camera/Android.bp index bd4597724e9..0671cc8993a 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -56,6 +56,7 @@ cc_aconfig_library { aconfig_declarations: "camera_platform_flags", host_supported: true, vendor_available: true, + double_loadable: true, } java_aconfig_library { From 3da54d2d681ddced9c907c8d8c3a04751f9f72cb Mon Sep 17 00:00:00 2001 From: aosp-builder Date: Mon, 7 Sep 2026 10:22:17 +0000 Subject: [PATCH 5/7] camera: fix utils/Log.h unavailable to the new vendor variant of libcamera_parameters utils/Log.h is a deprecated compatibility shim that just includes log/log.h internally (its own header says as much). Switched to the direct, vendor-safe log/log.h include and added the header_libs dependency (liblog_headers, itself vendor_available) needed to resolve it -- this library previously relied on implicit default include paths that do not extend to the vendor build variant now that it is vendor_available (for the legacy device/asus/flo camera HAL). --- camera/Android.bp | 5 ++++- camera/CameraParameters.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/camera/Android.bp b/camera/Android.bp index 0671cc8993a..90b9c118f05 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -181,7 +181,10 @@ cc_library_static { "include", ], srcs: ["CameraParameters.cpp"], - + // utils/Log.h (libutils) isn't available to the vendor variant; the + // vendor-safe replacement is log/log.h (liblog), which provides the + // same ALOG*/LOG_TAG macros this file actually uses. + header_libs: ["liblog_headers"], } // AIDL interface between camera clients and the camera service. diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index 272b113f230..c7c63d08209 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -16,7 +16,7 @@ */ #define LOG_TAG "CameraParams" -#include +#include #include #include From 7b6bb8021a105b4df5381777d7e00d91b70e955d Mon Sep 17 00:00:00 2001 From: aosp-builder Date: Mon, 7 Sep 2026 10:56:04 +0000 Subject: [PATCH 6/7] camera: add missing libutils dependency to libcamera_parameters CameraParameters.h uses utils/KeyedVector.h and utils/String8.h -- real libutils types (unlike Log.h, not a deprecated shim). libutils is VNDK-core (vndk.enabled = true), so vendor code can link it directly; libcamera_client already declares this same shared_libs dependency, libcamera_parameters was simply missing it entirely (it previously had no shared_libs/header_libs at all, relying only on implicit default include paths that don't extend to its new vendor build variant). Checked both files' full include lists for any other similarly-missing dependency before committing, to avoid another round-trip. --- camera/Android.bp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/camera/Android.bp b/camera/Android.bp index 90b9c118f05..de552a64c59 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -185,6 +185,12 @@ cc_library_static { // vendor-safe replacement is log/log.h (liblog), which provides the // same ALOG*/LOG_TAG macros this file actually uses. header_libs: ["liblog_headers"], + // CameraParameters.h itself uses utils/KeyedVector.h and utils/String8.h + // (real libutils types, not a deprecated shim like Log.h -- libutils is + // VNDK-core, so vendor code can link it directly). libcamera_client + // already declares this same dependency; libcamera_parameters was + // simply missing it. + shared_libs: ["libutils"], } // AIDL interface between camera clients and the camera service. From e0b7b5801119b2b991951e83360e8ab6fe3b2604 Mon Sep 17 00:00:00 2001 From: aosp-builder Date: Mon, 7 Sep 2026 12:42:24 +0000 Subject: [PATCH 7/7] camera: add missing media_plugin_headers dependency to libcamera_client ICameraClient.cpp, ICameraRecordingProxy.cpp, and ICamera.cpp all include media/hardware/HardwareAPI.h, exported by frameworks/native/headers' media_plugin_headers module. On the platform variant this include path was reaching the compiler transitively (through some other shared_lib's own export chain); that transitive path doesn't extend to libcamera_client's new vendor_available variant. media_plugin_headers is already vendor_available, so declaring the real header_libs dependency directly on libcamera_client fixes both variants without depending on what another module happens to re-export. --- camera/Android.bp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/camera/Android.bp b/camera/Android.bp index de552a64c59..2d0e47f1b3c 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -127,6 +127,15 @@ cc_library { "lib-platform-compat-native-api", ], + // ICameraClient.cpp/ICameraRecordingProxy.cpp/ICamera.cpp include + // media/hardware/HardwareAPI.h. On the platform variant this resolved + // transitively through another shared_lib; that path doesn't extend to + // this module's new vendor variant, so declare the real dependency + // directly. media_plugin_headers is already vendor_available. + header_libs: [ + "media_plugin_headers", + ], + include_dirs: [ "system/media/private/camera/include", "frameworks/native/include/media/openmax",