199552fe9Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 299552fe9Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 399552fe9Sopenharmony_ci# you may not use this file except in compliance with the License. 499552fe9Sopenharmony_ci# You may obtain a copy of the License at 599552fe9Sopenharmony_ci# 699552fe9Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 799552fe9Sopenharmony_ci# 899552fe9Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 999552fe9Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1099552fe9Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1199552fe9Sopenharmony_ci# See the License for the specific language governing permissions and 1299552fe9Sopenharmony_ci# limitations under the License. 1399552fe9Sopenharmony_ciimport("//build/ohos.gni") 1499552fe9Sopenharmony_ci 1599552fe9Sopenharmony_cistandby_service_root_path = "//foundation/resourceschedule/device_standby" 1699552fe9Sopenharmony_ci 1799552fe9Sopenharmony_cistandby_service_part_name = "device_standby" 1899552fe9Sopenharmony_ci 1999552fe9Sopenharmony_cistandby_interfaces_path = "${standby_service_root_path}/interfaces" 2099552fe9Sopenharmony_ci 2199552fe9Sopenharmony_cistandby_innerkits_path = "${standby_interfaces_path}/innerkits" 2299552fe9Sopenharmony_ci 2399552fe9Sopenharmony_cistandby_plugins_path = "${standby_service_root_path}/plugins" 2499552fe9Sopenharmony_ci 2599552fe9Sopenharmony_cistandby_service_constraints_path = "${standby_plugins_path}/extend_constraints" 2699552fe9Sopenharmony_ci 2799552fe9Sopenharmony_cistandby_service_strategy_path = "${standby_plugins_path}/strategy" 2899552fe9Sopenharmony_ci 2999552fe9Sopenharmony_cistandby_service_message_listener_path = 3099552fe9Sopenharmony_ci "${standby_plugins_path}/message_listener" 3199552fe9Sopenharmony_ci 3299552fe9Sopenharmony_cistandby_service_standby_state_path = "${standby_plugins_path}/standby_state" 3399552fe9Sopenharmony_ci 3499552fe9Sopenharmony_cistandby_service_utils_path = "${standby_service_root_path}/utils" 3599552fe9Sopenharmony_ci 3699552fe9Sopenharmony_cistandby_utils_common_path = "${standby_service_utils_path}/common" 3799552fe9Sopenharmony_ci 3899552fe9Sopenharmony_cistandby_utils_policy_path = "${standby_service_utils_path}/policy" 3999552fe9Sopenharmony_ci 4099552fe9Sopenharmony_cistandby_service_frameworks_path = "${standby_service_root_path}/frameworks" 4199552fe9Sopenharmony_ci 4299552fe9Sopenharmony_cistandby_service_path = "${standby_service_root_path}/services" 4399552fe9Sopenharmony_ci 4499552fe9Sopenharmony_cideclare_args() { 4599552fe9Sopenharmony_ci enable_standby_configpolicy = true 4699552fe9Sopenharmony_ci if (defined(global_parts_info) && 4799552fe9Sopenharmony_ci !defined(global_parts_info.customization_config_policy)) { 4899552fe9Sopenharmony_ci enable_standby_configpolicy = false 4999552fe9Sopenharmony_ci } 5099552fe9Sopenharmony_ci 5199552fe9Sopenharmony_ci enable_background_task_mgr = true 5299552fe9Sopenharmony_ci if (defined(global_parts_info) && 5399552fe9Sopenharmony_ci !defined(global_parts_info.resourceschedule_background_task_mgr)) { 5499552fe9Sopenharmony_ci enable_background_task_mgr = false 5599552fe9Sopenharmony_ci } 5699552fe9Sopenharmony_ci 5799552fe9Sopenharmony_ci standby_power_manager_enable = true 5899552fe9Sopenharmony_ci if (defined(global_parts_info) && 5999552fe9Sopenharmony_ci !defined(global_parts_info.powermgr_power_manager)) { 6099552fe9Sopenharmony_ci standby_power_manager_enable = false 6199552fe9Sopenharmony_ci } 6299552fe9Sopenharmony_ci 6399552fe9Sopenharmony_ci standby_battery_manager_enable = true 6499552fe9Sopenharmony_ci if (defined(global_parts_info) && 6599552fe9Sopenharmony_ci !defined(global_parts_info.powermgr_battery_manager)) { 6699552fe9Sopenharmony_ci standby_battery_manager_enable = false 6799552fe9Sopenharmony_ci } 6899552fe9Sopenharmony_ci 6999552fe9Sopenharmony_ci standby_multimodalinput_input_enable = true 7099552fe9Sopenharmony_ci if (defined(global_parts_info) && 7199552fe9Sopenharmony_ci !defined(global_parts_info.multimodalinput_input)) { 7299552fe9Sopenharmony_ci standby_multimodalinput_input_enable = false 7399552fe9Sopenharmony_ci } 7499552fe9Sopenharmony_ci 7599552fe9Sopenharmony_ci standby_sensors_sensor_enable = true 7699552fe9Sopenharmony_ci if (defined(global_parts_info) && 7799552fe9Sopenharmony_ci !defined(global_parts_info.sensors_sensor)) { 7899552fe9Sopenharmony_ci standby_sensors_sensor_enable = false 7999552fe9Sopenharmony_ci } 8099552fe9Sopenharmony_ci 8199552fe9Sopenharmony_ci standby_communication_netmanager_base_enable = true 8299552fe9Sopenharmony_ci if (defined(global_parts_info) && 8399552fe9Sopenharmony_ci !defined(global_parts_info.communication_netmanager_base)) { 8499552fe9Sopenharmony_ci standby_communication_netmanager_base_enable = false 8599552fe9Sopenharmony_ci } 8699552fe9Sopenharmony_ci 8799552fe9Sopenharmony_ci standby_rss_work_scheduler_enable = true 8899552fe9Sopenharmony_ci if (defined(global_parts_info) && 8999552fe9Sopenharmony_ci !defined(global_parts_info.resourceschedule_work_scheduler)) { 9099552fe9Sopenharmony_ci standby_rss_work_scheduler_enable = false 9199552fe9Sopenharmony_ci } 9299552fe9Sopenharmony_ci 9399552fe9Sopenharmony_ci device_standby_access_token_enable = true 9499552fe9Sopenharmony_ci if (defined(global_parts_info) && 9599552fe9Sopenharmony_ci !defined(global_parts_info.security_access_token)) { 9699552fe9Sopenharmony_ci device_standby_access_token_enable = false 9799552fe9Sopenharmony_ci } 9899552fe9Sopenharmony_ci 9999552fe9Sopenharmony_ci # features 10099552fe9Sopenharmony_ci device_standby_plugin_enable = true 10199552fe9Sopenharmony_ci} 102