# Copyright (c) 2022-2023 Huawei Device Co., Ltd. # 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. access_token_path = "//base/security/access_token" VENDOR_CONFIG_PATH = rebase_path( "//vendor/${product_company}/${product_name}/base/security/access_token/access_token_impl.gni") CMD = "if [ -f ${VENDOR_CONFIG_PATH} ]; then echo true; else echo false; fi" vendor_config_exist = exec_script("//build/lite/run_shell_cmd.py", [ CMD ], "value") if (vendor_config_exist) { import( "//vendor/${product_company}/${product_name}/base/security/access_token/access_token_impl.gni") } else { access_token_impl_sources = [] access_token_impl_include_dirs = [] } if (!defined(global_parts_info) || defined(global_parts_info.distributedhardware_device_manager)) { token_sync_enable = true } else { token_sync_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.security_dlp_permission_service)) { dlp_permission_enable = true } else { dlp_permission_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.ability_ability_base)) { ability_base_enable = true } else { ability_base_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.hiviewdfx_hicollie)) { hicollie_enable = true } else { hicollie_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.hiviewdfx_hitrace_native)) { hiviewdfx_hitrace_native_enable = true } else { hiviewdfx_hitrace_native_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.multimedia_audio_framework)) { audio_framework_enable = true } else { audio_framework_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.multimedia_camera_framework)) { camera_framework_enable = true } else { camera_framework_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.ability_ability_runtime)) { ability_runtime_enable = true } else { ability_runtime_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.powermgr_power_manager)) { power_manager_enable = true } else { power_manager_enable = false } if (!defined(global_parts_info) || defined(global_parts_info.security_security_component_enhance)) { security_component_enhance_enable = true } else { security_component_enhance_enable = false }