1# Copyright (c) 2023 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("../displaymgr.gni") 15 16config("brightness_manager_config") { 17 include_dirs = [ "include" ] 18} 19 20ohos_static_library("brightness_manager") { 21 sanitize = { 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 branch_protector_ret = "pac_ret" 27 28 sources = [ 29 "src/brightness_action.cpp", 30 "src/brightness_dimming.cpp", 31 "src/brightness_manager.cpp", 32 "src/brightness_param_helper.cpp", 33 "src/brightness_service.cpp", 34 "src/brightness_setting_helper.cpp", 35 "src/calculation_config_parser.cpp", 36 "src/calculation_curve.cpp", 37 "src/calculation_manager.cpp", 38 "src/config_parser.cpp", 39 "src/config_parser_base.cpp", 40 "src/light_lux_buffer.cpp", 41 "src/light_lux_manager.cpp", 42 "src/lux_filter_config_parser.cpp", 43 "src/lux_threshold_config_parser.cpp", 44 ] 45 46 configs = [ 47 ":brightness_manager_config", 48 "${displaymgr_utils_path}:utils_config", 49 "${displaymgr_inner_api}:displaymgr_public_config", 50 ] 51 52 deps = [ "//third_party/jsoncpp:jsoncpp" ] 53 54 external_deps = [ 55 "ability_runtime:ability_manager", 56 "c_utils:utils", 57 "data_share:datashare_consumer", 58 "ffrt:libffrt", 59 "hicollie:libhicollie", 60 "hilog:libhilog", 61 "hisysevent:libhisysevent", 62 "image_framework:image_native", 63 "ipc:ipc_core", 64 "power_manager:power_ffrt", 65 "power_manager:power_setting", 66 "power_manager:power_sysparam", 67 "safwk:system_ability_fwk", 68 "window_manager:libdm", 69 ] 70 71 defines = [] 72 if (has_sensors_sensor_part) { 73 external_deps += [ "sensor:sensor_interface_native" ] 74 defines += [ "ENABLE_SENSOR_PART" ] 75 } 76 77 subsystem_name = "powermgr" 78 part_name = "${displaymgr_part_name}" 79} 80