aidl: camera: Migrate to select()
Change-Id: Id29a05301cc720fcbc9b28c98f3c98e2d67df166
This commit is contained in:
@@ -1,32 +1,23 @@
|
||||
soong_config_module_type {
|
||||
name: "samsung_camera3",
|
||||
module_type: "cc_defaults",
|
||||
config_namespace: "samsungCameraVars",
|
||||
bool_variables: [
|
||||
"needs_sec_get_cam_pos_v1",
|
||||
"needs_sec_get_cam_pos_v2",
|
||||
"needs_sec_reserved_field",
|
||||
"usage_64bit",
|
||||
],
|
||||
properties: ["cflags"],
|
||||
}
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2024-2026 The LineageOS Project
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
samsung_camera3 {
|
||||
cc_defaults {
|
||||
name: "samsung_camera3_defaults",
|
||||
soong_config_variables: {
|
||||
needs_sec_get_cam_pos_v1: {
|
||||
cflags: ["-DCAMERA_NEEDS_SEC_GET_CAM_POS_V1"],
|
||||
},
|
||||
needs_sec_get_cam_pos_v2: {
|
||||
cflags: ["-DCAMERA_NEEDS_SEC_GET_CAM_POS_V2"],
|
||||
},
|
||||
needs_sec_reserved_field: {
|
||||
cflags: ["-DCAMERA_NEEDS_SEC_RESERVED_FIELD"],
|
||||
},
|
||||
usage_64bit: {
|
||||
cflags: ["-DCAMERA_64BIT_USAGE"],
|
||||
},
|
||||
},
|
||||
cppflags: select(soong_config_variable("samsungCameraVars", "needs_sec_get_cam_pos_v1"), {
|
||||
true: ["-DCAMERA_NEEDS_SEC_GET_CAM_POS_V1"],
|
||||
default: [],
|
||||
}) + select(soong_config_variable("samsungCameraVars", "needs_sec_get_cam_pos_v2"), {
|
||||
true: ["-DCAMERA_NEEDS_SEC_GET_CAM_POS_V2"],
|
||||
default: [],
|
||||
}) + select(soong_config_variable("samsungCameraVars", "needs_sec_reserved_field"), {
|
||||
true: ["-DCAMERA_NEEDS_SEC_RESERVED_FIELD"],
|
||||
default: [],
|
||||
}) + select(soong_config_variable("samsungCameraVars", "usage_64bit"), {
|
||||
true: ["-DCAMERA_64BIT_USAGE"],
|
||||
default: [],
|
||||
}),
|
||||
}
|
||||
|
||||
cc_library_headers {
|
||||
|
||||
@@ -1,35 +1,18 @@
|
||||
//
|
||||
// Copyright (C) 2024 The LineageOS Project
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2024-2026 The LineageOS Project
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
soong_config_module_type {
|
||||
name: "extra_ids",
|
||||
module_type: "cc_defaults",
|
||||
config_namespace: "samsungCameraVars",
|
||||
value_variables: ["extra_ids"],
|
||||
properties: ["cppflags"],
|
||||
}
|
||||
|
||||
extra_ids {
|
||||
name: "extra_id_defaults",
|
||||
soong_config_variables: {
|
||||
extra_ids: {
|
||||
cppflags: ["-DEXTRA_IDS=%s"],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "camera_service_aidl_defaults.samsung",
|
||||
defaults: [
|
||||
"extra_id_defaults",
|
||||
"samsung_camera3_defaults",
|
||||
],
|
||||
defaults: ["samsung_camera3_defaults"],
|
||||
vintf_fragments: ["android.hardware.camera.provider-service.samsung.xml"],
|
||||
vendor: true,
|
||||
relative_install_path: "hw",
|
||||
cppflags: select(soong_config_variable("samsungCameraVars", "extra_ids"), {
|
||||
any @ flag_val: ["-DEXTRA_IDS=" + flag_val],
|
||||
default: [],
|
||||
}),
|
||||
srcs: [
|
||||
"service.cpp",
|
||||
"CameraProvider.cpp",
|
||||
|
||||
Reference in New Issue
Block a user