1595d5899Sopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2595d5899Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3595d5899Sopenharmony_ci# you may not use this file except in compliance with the License. 4595d5899Sopenharmony_ci# You may obtain a copy of the License at 5595d5899Sopenharmony_ci# 6595d5899Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7595d5899Sopenharmony_ci# 8595d5899Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9595d5899Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10595d5899Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11595d5899Sopenharmony_ci# See the License for the specific language governing permissions and 12595d5899Sopenharmony_ci# limitations under the License. 13595d5899Sopenharmony_ci 14595d5899Sopenharmony_ciimport("../../displaymgr.gni") 15595d5899Sopenharmony_ci 16595d5899Sopenharmony_ciconfig("displaymgr_private_config") { 17595d5899Sopenharmony_ci include_dirs = [ "${displaymgr_inner_api}/native/include" ] 18595d5899Sopenharmony_ci} 19595d5899Sopenharmony_ci 20595d5899Sopenharmony_ciconfig("displaymgr_public_config") { 21595d5899Sopenharmony_ci include_dirs = [ 22595d5899Sopenharmony_ci "native/include", 23595d5899Sopenharmony_ci "zidl/include", 24595d5899Sopenharmony_ci ] 25595d5899Sopenharmony_ci} 26595d5899Sopenharmony_ci 27595d5899Sopenharmony_ciohos_shared_library("displaymgrservice") { 28595d5899Sopenharmony_ci sanitize = { 29595d5899Sopenharmony_ci cfi = true 30595d5899Sopenharmony_ci cfi_cross_dso = true 31595d5899Sopenharmony_ci debug = false 32595d5899Sopenharmony_ci } 33595d5899Sopenharmony_ci branch_protector_ret = "pac_ret" 34595d5899Sopenharmony_ci 35595d5899Sopenharmony_ci sources = [ 36595d5899Sopenharmony_ci "native/src/display_auto_brightness.cpp", 37595d5899Sopenharmony_ci "native/src/display_param_helper.cpp", 38595d5899Sopenharmony_ci "native/src/display_power_mgr_service.cpp", 39595d5899Sopenharmony_ci "native/src/display_setting_helper.cpp", 40595d5899Sopenharmony_ci "native/src/display_system_ability.cpp", 41595d5899Sopenharmony_ci "native/src/gradual_animator.cpp", 42595d5899Sopenharmony_ci "native/src/screen_action.cpp", 43595d5899Sopenharmony_ci "native/src/screen_controller.cpp", 44595d5899Sopenharmony_ci "zidl/src/display_brightness_callback_proxy.cpp", 45595d5899Sopenharmony_ci "zidl/src/display_power_callback_proxy.cpp", 46595d5899Sopenharmony_ci "zidl/src/display_power_mgr_stub.cpp", 47595d5899Sopenharmony_ci ] 48595d5899Sopenharmony_ci 49595d5899Sopenharmony_ci configs = [ 50595d5899Sopenharmony_ci "${displaymgr_utils_path}:utils_config", 51595d5899Sopenharmony_ci ":displaymgr_private_config", 52595d5899Sopenharmony_ci "${displaymgr_utils_path}:coverage_flags", 53595d5899Sopenharmony_ci ] 54595d5899Sopenharmony_ci 55595d5899Sopenharmony_ci public_configs = [ 56595d5899Sopenharmony_ci ":displaymgr_public_config", 57595d5899Sopenharmony_ci "${brightnessmgr_root_path}:brightness_manager_config", 58595d5899Sopenharmony_ci ] 59595d5899Sopenharmony_ci 60595d5899Sopenharmony_ci public_deps = [ "${brightnessmgr_root_path}:brightness_manager" ] 61595d5899Sopenharmony_ci 62595d5899Sopenharmony_ci external_deps = [ "power_manager:power_permission" ] 63595d5899Sopenharmony_ci external_deps += [ 64595d5899Sopenharmony_ci "ability_base:zuri", 65595d5899Sopenharmony_ci "ability_runtime:ability_manager", 66595d5899Sopenharmony_ci "c_utils:utils", 67595d5899Sopenharmony_ci "data_share:datashare_consumer", 68595d5899Sopenharmony_ci "eventhandler:libeventhandler", 69595d5899Sopenharmony_ci "ffrt:libffrt", 70595d5899Sopenharmony_ci "graphic_2d:librender_service_base", 71595d5899Sopenharmony_ci "hicollie:libhicollie", 72595d5899Sopenharmony_ci "hilog:libhilog", 73595d5899Sopenharmony_ci "image_framework:image_native", 74595d5899Sopenharmony_ci "ipc:ipc_core", 75595d5899Sopenharmony_ci "power_manager:power_ffrt", 76595d5899Sopenharmony_ci "power_manager:power_setting", 77595d5899Sopenharmony_ci "power_manager:power_sysparam", 78595d5899Sopenharmony_ci "power_manager:powermgr_client", 79595d5899Sopenharmony_ci "safwk:system_ability_fwk", 80595d5899Sopenharmony_ci "samgr:samgr_proxy", 81595d5899Sopenharmony_ci "skia:skia_canvaskit", 82595d5899Sopenharmony_ci "window_manager:libdm_lite", 83595d5899Sopenharmony_ci ] 84595d5899Sopenharmony_ci 85595d5899Sopenharmony_ci if (has_sensors_sensor_part) { 86595d5899Sopenharmony_ci external_deps += [ "sensor:sensor_interface_native" ] 87595d5899Sopenharmony_ci defines += [ "ENABLE_SENSOR_PART" ] 88595d5899Sopenharmony_ci } 89595d5899Sopenharmony_ci if (has_hiviewdfx_hisysevent_part) { 90595d5899Sopenharmony_ci external_deps += [ "hisysevent:libhisysevent" ] 91595d5899Sopenharmony_ci } 92595d5899Sopenharmony_ci shlib_type = "sa" 93595d5899Sopenharmony_ci subsystem_name = "powermgr" 94595d5899Sopenharmony_ci part_name = "${displaymgr_part_name}" 95595d5899Sopenharmony_ci} 96595d5899Sopenharmony_ci 97595d5899Sopenharmony_ciohos_shared_library("displaymgr_stub") { 98595d5899Sopenharmony_ci sources = [ "zidl/src/display_power_mgr_stub.cpp" ] 99595d5899Sopenharmony_ci 100595d5899Sopenharmony_ci configs = [ 101595d5899Sopenharmony_ci "${displaymgr_utils_path}:utils_config", 102595d5899Sopenharmony_ci ":displaymgr_private_config", 103595d5899Sopenharmony_ci "${displaymgr_utils_path}:coverage_flags", 104595d5899Sopenharmony_ci ] 105595d5899Sopenharmony_ci 106595d5899Sopenharmony_ci public_configs = [ ":displaymgr_public_config" ] 107595d5899Sopenharmony_ci 108595d5899Sopenharmony_ci external_deps = [ 109595d5899Sopenharmony_ci "c_utils:utils", 110595d5899Sopenharmony_ci "hicollie:libhicollie", 111595d5899Sopenharmony_ci "hilog:libhilog", 112595d5899Sopenharmony_ci "ipc:ipc_core", 113595d5899Sopenharmony_ci "power_manager:power_setting", 114595d5899Sopenharmony_ci "safwk:system_ability_fwk", 115595d5899Sopenharmony_ci ] 116595d5899Sopenharmony_ci 117595d5899Sopenharmony_ci subsystem_name = "powermgr" 118595d5899Sopenharmony_ci part_name = "${displaymgr_part_name}" 119595d5899Sopenharmony_ci} 120