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") 15 16declare_args() { 17 power_manager_feature_poweroff_charge = false 18 power_manager_feature_runninglock = true 19 power_manager_feature_shutdown_reboot = true 20 power_manager_feature_screen_on_off = true 21 power_manager_feature_power_state = true 22 power_manager_feature_power_mode = true 23 power_manager_feature_wakeup_action = false 24 power_manager_feature_power_dialog = true 25 power_manager_feature_enable_s4 = false 26 power_manager_feature_screen_on_timeout_check = false 27 power_manager_feature_doubleclick_or_pickup = true 28 power_manager_feature_force_sleep_broadcast = false 29 power_manager_feature_movement = true 30 power_manager_feature_charging_type_setting = false 31} 32 33cflags_cc = [] 34if (!defined(global_parts_info) || 35 defined(global_parts_info.powermgr_display_manager)) { 36 has_display_manager_part = true 37 cflags_cc += [ "-DHAS_DISPLAY_MANAGER_PART" ] 38} else { 39 has_display_manager_part = false 40} 41 42if (!defined(global_parts_info) || 43 defined(global_parts_info.resourceschedule_device_standby)) { 44 has_device_standby_part = true 45 cflags_cc += [ "-DHAS_DEVICE_STANDBY_PART" ] 46} else { 47 has_device_standby_part = false 48} 49 50if (!defined(global_parts_info) || defined(global_parts_info.sensors_sensor)) { 51 has_sensors_sensor_part = true 52 cflags_cc += [ "-DHAS_SENSORS_SENSOR_PART" ] 53} else { 54 has_sensors_sensor_part = false 55} 56 57if (!defined(global_parts_info) || 58 defined(global_parts_info.multimodalinput_input)) { 59 has_multimodalinput_input_part = true 60 cflags_cc += [ "-DHAS_MULTIMODALINPUT_INPUT_PART" ] 61} else { 62 has_multimodalinput_input_part = false 63} 64 65if (power_manager_feature_enable_s4) { 66 defines += [ "POWER_MANAGER_POWER_ENABLE_S4" ] 67} 68 69ability_runtime_path = "//foundation/ability/ability_runtime" 70 71ability_runtime_inner_api_path = "${ability_runtime_path}/interfaces/inner_api" 72 73ability_runtime_services_path = "${ability_runtime_path}/services" 74 75powermgr_part_name = "power_manager" 76 77powermgr_root_path = "//base/powermgr/power_manager" 78 79powermgr_service_path = "${powermgr_root_path}/services" 80 81powermgr_service_zidl = "${powermgr_service_path}/zidl" 82 83powermgr_framework = "${powermgr_root_path}/frameworks" 84powermgr_framework_native = "${powermgr_framework}/native" 85 86powermgr_inner_api = "${powermgr_root_path}/interfaces/inner_api" 87 88powermgr_utils_path = "${powermgr_root_path}/utils" 89 90system_type = "default" 91