Loading services/camera/virtualcamera/flags/Android.bp 0 → 100644 +33 −0 Original line number Diff line number Diff line soong_config_module_type { name: "virtual_device_build_flags_cc_defaults", module_type: "cc_defaults", config_namespace: "vdm", bool_variables: [ "virtual_camera_service_enabled", ], properties: [ "cflags", ], } soong_config_bool_variable { name: "virtual_camera_service_enabled", } virtual_device_build_flags_cc_defaults { name: "virtual_device_build_flags_defaults", soong_config_variables: { virtual_camera_service_enabled: { cflags: ["-DVIRTUAL_CAMERA_SERVICE_ENABLED=1"], }, }, } cc_library_static { name: "libvirtualdevicebuildflags", srcs: [ "android_companion_virtualdevice_build_flags.cc", ], export_include_dirs: ["."], defaults: ["virtual_device_build_flags_defaults"], } services/camera/virtualcamera/flags/android_companion_virtualdevice_build_flags.cc 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source 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. */ namespace android { namespace companion { namespace virtualdevice { namespace flags { bool virtual_camera_service_build_flag() { #if VIRTUAL_CAMERA_SERVICE_ENABLED return true; #else return false; #endif } } // namespace flags } // namespace virtualdevice } // namespace companion } // namespace android services/camera/virtualcamera/flags/android_companion_virtualdevice_build_flags.h 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source 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. */ namespace android { namespace companion { namespace virtualdevice { namespace flags { // Returns true if the virtual camera service is enabled // in the build. // // TODO(b/309090563) - Deprecate in favor of autogened library to query build // flags once available. bool virtual_camera_service_build_flag(); } // namespace flags } // namespace virtualdevice } // namespace companion } // namespace android Loading
services/camera/virtualcamera/flags/Android.bp 0 → 100644 +33 −0 Original line number Diff line number Diff line soong_config_module_type { name: "virtual_device_build_flags_cc_defaults", module_type: "cc_defaults", config_namespace: "vdm", bool_variables: [ "virtual_camera_service_enabled", ], properties: [ "cflags", ], } soong_config_bool_variable { name: "virtual_camera_service_enabled", } virtual_device_build_flags_cc_defaults { name: "virtual_device_build_flags_defaults", soong_config_variables: { virtual_camera_service_enabled: { cflags: ["-DVIRTUAL_CAMERA_SERVICE_ENABLED=1"], }, }, } cc_library_static { name: "libvirtualdevicebuildflags", srcs: [ "android_companion_virtualdevice_build_flags.cc", ], export_include_dirs: ["."], defaults: ["virtual_device_build_flags_defaults"], }
services/camera/virtualcamera/flags/android_companion_virtualdevice_build_flags.cc 0 → 100644 +33 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source 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. */ namespace android { namespace companion { namespace virtualdevice { namespace flags { bool virtual_camera_service_build_flag() { #if VIRTUAL_CAMERA_SERVICE_ENABLED return true; #else return false; #endif } } // namespace flags } // namespace virtualdevice } // namespace companion } // namespace android
services/camera/virtualcamera/flags/android_companion_virtualdevice_build_flags.h 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright 2024 The Android Open Source 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. */ namespace android { namespace companion { namespace virtualdevice { namespace flags { // Returns true if the virtual camera service is enabled // in the build. // // TODO(b/309090563) - Deprecate in favor of autogened library to query build // flags once available. bool virtual_camera_service_build_flag(); } // namespace flags } // namespace virtualdevice } // namespace companion } // namespace android