1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14VENDOR_CONFIG_PATH = rebase_path( 15 "//vendor/${product_company}/${product_name}/base/security/access_token/access_token_impl.gni") 16CMD = "if [ -f ${VENDOR_CONFIG_PATH} ]; then echo true; else echo false; fi" 17 18vendor_config_exist = 19 exec_script("//build/lite/run_shell_cmd.py", [ CMD ], "value") 20if (vendor_config_exist) { 21 import( 22 "//vendor/${product_company}/${product_name}/base/security/access_token/access_token_impl.gni") 23} else { 24 access_token_impl_sources = [] 25 access_token_impl_include_dirs = [] 26} 27 28if (!defined(global_parts_info) || 29 defined(global_parts_info.distributedhardware_device_manager)) { 30 token_sync_enable = true 31} else { 32 token_sync_enable = false 33} 34 35if (!defined(global_parts_info) || 36 defined(global_parts_info.security_dlp_permission_service)) { 37 dlp_permission_enable = true 38} else { 39 dlp_permission_enable = false 40} 41 42if (!defined(global_parts_info) || 43 defined(global_parts_info.ability_ability_base)) { 44 ability_base_enable = true 45} else { 46 ability_base_enable = false 47} 48