15ccb8f90Sopenharmony_ci# Copyright (C) 2021 Huawei Device Co., Ltd. 25ccb8f90Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 35ccb8f90Sopenharmony_ci# you may not use this file except in compliance with the License. 45ccb8f90Sopenharmony_ci# You may obtain a copy of the License at 55ccb8f90Sopenharmony_ci# 65ccb8f90Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 75ccb8f90Sopenharmony_ci# 85ccb8f90Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 95ccb8f90Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 105ccb8f90Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115ccb8f90Sopenharmony_ci# See the License for the specific language governing permissions and 125ccb8f90Sopenharmony_ci# limitations under the License. 135ccb8f90Sopenharmony_ciimport("//build/ohos.gni") 145ccb8f90Sopenharmony_ciimport("../../../powermgr.gni") 155ccb8f90Sopenharmony_ci 165ccb8f90Sopenharmony_ci## Install power_mode_config.xml to /system/etc/power_config/power_mode_config.xml 175ccb8f90Sopenharmony_ciohos_prebuilt_etc("power_mode_config") { 185ccb8f90Sopenharmony_ci source = "power_mode_config.xml" 195ccb8f90Sopenharmony_ci relative_install_dir = "power_config" 205ccb8f90Sopenharmony_ci part_name = "${powermgr_part_name}" 215ccb8f90Sopenharmony_ci subsystem_name = "powermgr" 225ccb8f90Sopenharmony_ci} 235ccb8f90Sopenharmony_ci 245ccb8f90Sopenharmony_ci## Install power_suspend.json to /system/etc/power_config/power_suspend.json 255ccb8f90Sopenharmony_ciohos_prebuilt_etc("power_suspend_config") { 265ccb8f90Sopenharmony_ci source = "power_suspend.json" 275ccb8f90Sopenharmony_ci relative_install_dir = "power_config" 285ccb8f90Sopenharmony_ci install_images = [ system_base_dir ] 295ccb8f90Sopenharmony_ci part_name = "${powermgr_part_name}" 305ccb8f90Sopenharmony_ci subsystem_name = "powermgr" 315ccb8f90Sopenharmony_ci} 325ccb8f90Sopenharmony_ci 335ccb8f90Sopenharmony_ci## Install power_wakeup.json to /system/etc/power_config/power_wakeup.json 345ccb8f90Sopenharmony_ciohos_prebuilt_etc("power_wakeup_config") { 355ccb8f90Sopenharmony_ci source = "power_wakeup.json" 365ccb8f90Sopenharmony_ci relative_install_dir = "power_config" 375ccb8f90Sopenharmony_ci install_images = [ system_base_dir ] 385ccb8f90Sopenharmony_ci part_name = "${powermgr_part_name}" 395ccb8f90Sopenharmony_ci subsystem_name = "powermgr" 405ccb8f90Sopenharmony_ci} 415ccb8f90Sopenharmony_ci 425ccb8f90Sopenharmony_ci## Install power_vibrator.json to /system/etc/power_config/power_vibrator.json 435ccb8f90Sopenharmony_ciohos_prebuilt_etc("power_vibrator_config") { 445ccb8f90Sopenharmony_ci source = "power_vibrator.json" 455ccb8f90Sopenharmony_ci relative_install_dir = "power_config" 465ccb8f90Sopenharmony_ci install_images = [ system_base_dir ] 475ccb8f90Sopenharmony_ci part_name = "${powermgr_part_name}" 485ccb8f90Sopenharmony_ci subsystem_name = "powermgr" 495ccb8f90Sopenharmony_ci} 505ccb8f90Sopenharmony_ci 515ccb8f90Sopenharmony_ciif (power_manager_feature_wakeup_action) { 525ccb8f90Sopenharmony_ci ## Install power_wakeup_action.json to /system/etc/power_config/power_wakeup_action.json 535ccb8f90Sopenharmony_ci ohos_prebuilt_etc("power_wakeup_action_config") { 545ccb8f90Sopenharmony_ci source = "power_wakeup_action.json" 555ccb8f90Sopenharmony_ci relative_install_dir = "power_config" 565ccb8f90Sopenharmony_ci install_images = [ system_base_dir ] 575ccb8f90Sopenharmony_ci part_name = "${powermgr_part_name}" 585ccb8f90Sopenharmony_ci subsystem_name = "powermgr" 595ccb8f90Sopenharmony_ci } 605ccb8f90Sopenharmony_ci} 615ccb8f90Sopenharmony_ci 625ccb8f90Sopenharmony_cigroup("power_service_config") { 635ccb8f90Sopenharmony_ci deps = [ 645ccb8f90Sopenharmony_ci ":power_mode_config", 655ccb8f90Sopenharmony_ci ":power_suspend_config", 665ccb8f90Sopenharmony_ci ":power_vibrator_config", 675ccb8f90Sopenharmony_ci ":power_wakeup_config", 685ccb8f90Sopenharmony_ci ] 695ccb8f90Sopenharmony_ci 705ccb8f90Sopenharmony_ci if (power_manager_feature_wakeup_action) { 715ccb8f90Sopenharmony_ci deps += [ ":power_wakeup_action_config" ] 725ccb8f90Sopenharmony_ci } 735ccb8f90Sopenharmony_ci} 74