• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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
14access_token_path = "//base/security/access_token"
15VENDOR_CONFIG_PATH = rebase_path(
16        "//vendor/${product_company}/${product_name}/base/security/access_token/access_token_impl.gni")
17CMD = "if [ -f ${VENDOR_CONFIG_PATH} ]; then echo true; else echo false; fi"
18
19vendor_config_exist =
20    exec_script("//build/lite/run_shell_cmd.py", [ CMD ], "value")
21if (vendor_config_exist) {
22  import(
23      "//vendor/${product_company}/${product_name}/base/security/access_token/access_token_impl.gni")
24} else {
25  access_token_impl_sources = []
26  access_token_impl_include_dirs = []
27}
28
29if (!defined(global_parts_info) ||
30    defined(global_parts_info.distributedhardware_device_manager)) {
31  token_sync_enable = true
32} else {
33  token_sync_enable = false
34}
35
36if (!defined(global_parts_info) ||
37    defined(global_parts_info.security_dlp_permission_service)) {
38  dlp_permission_enable = true
39} else {
40  dlp_permission_enable = false
41}
42
43if (!defined(global_parts_info) ||
44    defined(global_parts_info.ability_ability_base)) {
45  ability_base_enable = true
46} else {
47  ability_base_enable = false
48}
49
50if (!defined(global_parts_info) ||
51    defined(global_parts_info.hiviewdfx_hicollie)) {
52  hicollie_enable = true
53} else {
54  hicollie_enable = false
55}
56
57if (!defined(global_parts_info) ||
58    defined(global_parts_info.hiviewdfx_hitrace_native)) {
59  hiviewdfx_hitrace_native_enable = true
60} else {
61  hiviewdfx_hitrace_native_enable = false
62}
63
64if (!defined(global_parts_info) ||
65    defined(global_parts_info.multimedia_audio_framework)) {
66  audio_framework_enable = true
67} else {
68  audio_framework_enable = false
69}
70
71if (!defined(global_parts_info) ||
72    defined(global_parts_info.multimedia_camera_framework)) {
73  camera_framework_enable = true
74} else {
75  camera_framework_enable = false
76}
77
78if (!defined(global_parts_info) ||
79    defined(global_parts_info.ability_ability_runtime)) {
80  ability_runtime_enable = true
81} else {
82  ability_runtime_enable = false
83}
84
85if (!defined(global_parts_info) ||
86    defined(global_parts_info.powermgr_power_manager)) {
87  power_manager_enable = true
88} else {
89  power_manager_enable = false
90}
91
92if (!defined(global_parts_info) ||
93    defined(global_parts_info.security_security_component_enhance)) {
94  security_component_enhance_enable = true
95} else {
96  security_component_enhance_enable = false
97}
98