1# Copyright (c) 2021 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 14import("//build/ohos.gni") 15defines = [] 16if (!defined(global_parts_info) || 17 defined(global_parts_info.communication_bluetooth)) { 18 has_batterystats_bluetooth_part = true 19 defines += [ "HAS_BATTERYSTATS_BLUETOOTH_PART" ] 20} else { 21 has_batterystats_bluetooth_part = false 22} 23 24if (!defined(global_parts_info) || 25 defined(global_parts_info.communication_wifi)) { 26 has_batterystats_wifi_part = true 27 defines += [ "HAS_BATTERYSTATS_WIFI_PART" ] 28} else { 29 has_batterystats_wifi_part = false 30} 31 32if (!defined(global_parts_info) || 33 defined(global_parts_info.powermgr_display_manager)) { 34 has_batterystats_display_manager_part = true 35 defines += [ "HAS_BATTERYSTATS_DISPLAY_MANAGER_PART" ] 36} else { 37 has_batterystats_display_manager_part = false 38} 39 40if (!defined(global_parts_info) || 41 defined(global_parts_info.telephony_call_manager)) { 42 has_batterystats_call_manager_part = true 43 defines += [ "HAS_BATTERYSTATS_CALL_MANAGER_PART" ] 44} else { 45 has_batterystats_call_manager_part = false 46} 47 48if (!defined(global_parts_info) || 49 defined(global_parts_info.customization_config_policy)) { 50 has_batterystats_config_policy_part = true 51} else { 52 has_batterystats_config_policy_part = false 53} 54 55ability_runtime_path = "//foundation/ability/ability_runtime" 56ability_runtime_services_path = "${ability_runtime_path}/services" 57ability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits" 58batterystats_part_name = "battery_statistics" 59batterystats_root_path = "//base/powermgr/battery_statistics" 60batterystats_inner_api = "${batterystats_root_path}/interfaces/inner_api" 61batterystats_frameworks_path = "${batterystats_root_path}/frameworks" 62batterystats_service_path = "${batterystats_root_path}/services" 63batterystats_service_zidl = "${batterystats_service_path}/zidl" 64batterystats_service_native = "${batterystats_service_path}/native" 65batterystats_utils_path = "${batterystats_root_path}/utils" 66