Files
hardware_samsung/aidl/codec2/Android.bp
ata-kaner 121dddc138 aidl: codec2: Add missing seccomp architectures
Fixes following error on non-ARM targets.

error: hardware/samsung/aidl/codec2/Android.bp:62:1: module "android.software.media.c2-default-seccomp_policy" variant "android_x86": src: missing prebuilt source file

Change-Id: I6dcc59329618853d75f55750b1a21b405f0c175a
2025-10-20 05:36:03 +03:00

89 lines
2.9 KiB
Plaintext

/*
* Copyright 2019 The Android Open Source Project
* Copyright 2025 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
cc_binary {
name: "android.software.media.c2-service.samsung",
vendor: true,
relative_install_path: "hw",
init_rc: ["android.software.media.c2-service.samsung.rc"],
//
// default -> For devices that already have a c2@1.2 or c2-V1 service in their vendor (QTI c2, Samsung hardware c2 etc.)
// legacy_default0 -> For devices that already have a c2@1.0 service in their vendor (QTI c2, Samsung hardware c2 etc.)
// legacy_default -> For devices without a c2 service in their vendor
//
vintf_fragments: select(soong_config_variable("samsungCodec2Vars", "c2_instance_type"), {
any @ fragment: ["samsung_media_c2_" + fragment + ".xml"],
default: ["samsung_media_c2_default.xml"],
}),
defaults: [
"libcodec2-hidl-defaults",
"libcodec2-aidl-defaults",
],
srcs: [
"vendor.cpp",
],
// minijail is used to protect against unexpected system calls.
shared_libs: [
"libavservices_minijail",
"libbinder",
"libbinder_ndk",
] + select(soong_config_variable("samsungCodec2Vars", "target_componentstore_library"), {
any @ flag_val: [flag_val],
default: [],
}),
cflags: select(soong_config_variable("samsungCodec2Vars", "uses_legacy_component_store"), {
"true": ["-DLEGACY_COMPONENT_STORE" ],
default: [],
}),
required: ["android.software.media.c2-default-seccomp_policy"],
}
prebuilt_etc {
name: "android.software.media.c2-default-seccomp_policy",
vendor: true,
sub_dir: "seccomp_policy",
// If a specific architecture is targeted, multiple choices are not needed.
arch: {
arm: {
src: "seccomp_policy/android.software.media.c2-default-arm.policy",
},
arm64: {
src: "seccomp_policy/android.software.media.c2-default-arm64.policy",
},
riscv64: {
src: "seccomp_policy/android.software.media.c2-default-riscv64.policy",
},
x86: {
src: "seccomp_policy/android.software.media.c2-default-x86.policy",
},
x86_64: {
src: "seccomp_policy/android.software.media.c2-default-x86_64.policy",
},
},
// This may be removed.
required: ["crash_dump.policy"],
}