1f857971dSopenharmony_ci# Copyright (c) 2023-2024 Huawei Device Co., Ltd. 2f857971dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3f857971dSopenharmony_ci# you may not use this file except in compliance with the License. 4f857971dSopenharmony_ci# You may obtain a copy of the License at 5f857971dSopenharmony_ci# 6f857971dSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7f857971dSopenharmony_ci# 8f857971dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9f857971dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10f857971dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11f857971dSopenharmony_ci# See the License for the specific language governing permissions and 12f857971dSopenharmony_ci# limitations under the License. 13f857971dSopenharmony_ci 14f857971dSopenharmony_ciimport("//build/ohos.gni") 15f857971dSopenharmony_ci 16f857971dSopenharmony_cideclare_args() { 17f857971dSopenharmony_ci device_status_intention_framework = true 18f857971dSopenharmony_ci device_status_rust_enabled = false 19f857971dSopenharmony_ci device_status_interaction_coordination = false 20f857971dSopenharmony_ci device_status_drag_enable_monitor = true 21f857971dSopenharmony_ci device_status_drag_enable_interceptor = false 22f857971dSopenharmony_ci device_status_drag_enable_animation = false 23f857971dSopenharmony_ci device_status_performance_check = true 24f857971dSopenharmony_ci device_status_hisysevent_enable = false 25f857971dSopenharmony_ci device_status_hitrace_enable = false 26f857971dSopenharmony_ci device_status_udmf_enabled = false 27f857971dSopenharmony_ci device_status_sensor_enable = true 28f857971dSopenharmony_ci device_status_memmgr_enable = false 29f857971dSopenharmony_ci 30f857971dSopenharmony_ci # origin variables sets 31f857971dSopenharmony_ci if (!is_arkui_x) { 32f857971dSopenharmony_ci device_status_intention_framework = true 33f857971dSopenharmony_ci device_status_drag_enable_monitor = true 34f857971dSopenharmony_ci device_status_sensor_enable = true 35f857971dSopenharmony_ci device_status_memmgr_enable = false 36f857971dSopenharmony_ci 37f857971dSopenharmony_ci if (defined(global_parts_info)) { 38f857971dSopenharmony_ci if (!defined(global_parts_info.sensors_sensor)) { 39f857971dSopenharmony_ci device_status_sensor_enable = false 40f857971dSopenharmony_ci } 41f857971dSopenharmony_ci if (defined(global_parts_info.resourceschedule_memmgr_override)) { 42f857971dSopenharmony_ci device_status_memmgr_enable = true 43f857971dSopenharmony_ci } 44f857971dSopenharmony_ci } 45f857971dSopenharmony_ci } else { # is_arkui_x 46f857971dSopenharmony_ci device_status_intention_framework = false 47f857971dSopenharmony_ci device_status_drag_enable_monitor = false 48f857971dSopenharmony_ci device_status_sensor_enable = false 49f857971dSopenharmony_ci device_status_memmgr_enable = false 50f857971dSopenharmony_ci } 51f857971dSopenharmony_ci} 52f857971dSopenharmony_ci 53f857971dSopenharmony_ciif (defined(global_parts_info)) { 54f857971dSopenharmony_ci if (defined(global_parts_info.hiviewdfx_hisysevent)) { 55f857971dSopenharmony_ci device_status_hisysevent_enable = true 56f857971dSopenharmony_ci } 57f857971dSopenharmony_ci if (defined(global_parts_info.hiviewdfx_hitrace)) { 58f857971dSopenharmony_ci device_status_hitrace_enable = true 59f857971dSopenharmony_ci } 60f857971dSopenharmony_ci if (defined(global_parts_info.distributeddatamgr_udmf)) { 61f857971dSopenharmony_ci device_status_udmf_enabled = true 62f857971dSopenharmony_ci } 63f857971dSopenharmony_ci} 64f857971dSopenharmony_ci 65f857971dSopenharmony_ciability_runtime_path = "//foundation/ability/ability_runtime" 66f857971dSopenharmony_ciability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits" 67f857971dSopenharmony_cidevice_status_part_name = "device_status" 68f857971dSopenharmony_cidevice_status_subsystem_name = "msdp" 69f857971dSopenharmony_cidevice_status_root_path = "//base/msdp/device_status" 70f857971dSopenharmony_cidevice_status_interfaces_path = "${device_status_root_path}/interfaces" 71f857971dSopenharmony_cidevice_status_libs_path = "${device_status_root_path}/libs" 72f857971dSopenharmony_cidevice_status_frameworks_path = "${device_status_root_path}/frameworks" 73f857971dSopenharmony_cidevice_status_service_path = "${device_status_root_path}/services" 74f857971dSopenharmony_cidevice_status_utils_path = "${device_status_root_path}/utils/common" 75f857971dSopenharmony_cidevice_status_intention_path = "${device_status_root_path}/intention" 76f857971dSopenharmony_cidevice_status_fuzz_output_path = "${device_status_part_name}/device_status" 77f857971dSopenharmony_ciintention_root_path = "//base/msdp/device_status/intention" 78f857971dSopenharmony_cifile_dfs_service_path = "//foundation/filemanagement/dfs_service" 79f857971dSopenharmony_cifile_framework_root_path = "//foundation/appframework" 80f857971dSopenharmony_cifile_arkui_root_path = "//foundation/arkui" 81f857971dSopenharmony_cilibrary_utils_path = "//commonlibrary/c_utils" 82f857971dSopenharmony_ciplugins_media_path = "//plugins/multimedia" 83f857971dSopenharmony_cifile_dfx_hilog_path = "//base/hiviewdfx/hilog" 84f857971dSopenharmony_cifoundation_media_path = "//foundation/multimedia" 85f857971dSopenharmony_cifoundation_input_path = "//foundation/multimodalinput" 86f857971dSopenharmony_cifoundation_graphic_path = "//foundation/graphic" 87f857971dSopenharmony_ci 88f857971dSopenharmony_cidevice_status_default_defines = [] 89f857971dSopenharmony_ci 90f857971dSopenharmony_ciif (device_status_intention_framework) { 91f857971dSopenharmony_ci device_status_default_defines += [ "OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK" ] 92f857971dSopenharmony_ci} 93f857971dSopenharmony_ci 94f857971dSopenharmony_ciif (device_status_rust_enabled) { 95f857971dSopenharmony_ci device_status_default_defines += [ "OHOS_BUILD_ENABLE_RUST_IMPL" ] 96f857971dSopenharmony_ci} 97f857971dSopenharmony_ci 98f857971dSopenharmony_ciif (device_status_interaction_coordination) { 99f857971dSopenharmony_ci device_status_default_defines += [ "OHOS_BUILD_ENABLE_COORDINATION" ] 100f857971dSopenharmony_ci} 101f857971dSopenharmony_ci 102f857971dSopenharmony_ciif (device_status_performance_check) { 103f857971dSopenharmony_ci device_status_default_defines += [ "ENABLE_PERFORMANCE_CHECK" ] 104f857971dSopenharmony_ci} 105f857971dSopenharmony_ci 106f857971dSopenharmony_ciif (device_status_drag_enable_monitor) { 107f857971dSopenharmony_ci device_status_default_defines += [ "OHOS_DRAG_ENABLE_MONITOR" ] 108f857971dSopenharmony_ci} 109f857971dSopenharmony_ci 110f857971dSopenharmony_ciif (device_status_drag_enable_interceptor) { 111f857971dSopenharmony_ci device_status_default_defines += [ "OHOS_DRAG_ENABLE_INTERCEPTOR" ] 112f857971dSopenharmony_ci} 113f857971dSopenharmony_ci 114f857971dSopenharmony_ciif (device_status_drag_enable_animation) { 115f857971dSopenharmony_ci device_status_default_defines += [ "OHOS_DRAG_ENABLE_ANIMATION" ] 116f857971dSopenharmony_ci} 117f857971dSopenharmony_ci 118f857971dSopenharmony_ci# add new macro 119f857971dSopenharmony_ciif (is_arkui_x) { 120f857971dSopenharmony_ci device_status_default_defines += [ "OHOS_BUILD_ENABLE_ARKUI_X" ] 121f857971dSopenharmony_ci} 122