• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_config_parser.cpp",
31    "src/brightness_dimming.cpp",
32    "src/brightness_manager.cpp",
33    "src/brightness_manager_ext.cpp",
34    "src/brightness_param_helper.cpp",
35    "src/brightness_service.cpp",
36    "src/brightness_setting_helper.cpp",
37    "src/calculation_config_parser.cpp",
38    "src/calculation_curve.cpp",
39    "src/calculation_manager.cpp",
40    "src/config_parser.cpp",
41    "src/config_parser_base.cpp",
42    "src/light_lux_buffer.cpp",
43    "src/light_lux_manager.cpp",
44    "src/lux_filter_config_parser.cpp",
45    "src/lux_threshold_config_parser.cpp",
46  ]
47
48  configs = [
49    ":brightness_manager_config",
50    "${displaymgr_utils_path}:utils_config",
51    "${displaymgr_inner_api}:displaymgr_public_config",
52    "${displaymgr_root_path}/service:displaymgr_public_config",
53  ]
54
55  external_deps = [
56    "ability_base:zuri",
57    "ability_runtime:ability_manager",
58    "cJSON:cjson",
59    "c_utils:utils",
60    "data_share:datashare_consumer",
61    "eventhandler:libeventhandler",
62    "ffrt:libffrt",
63    "graphic_2d:librender_service_base",
64    "hicollie:libhicollie",
65    "hilog:libhilog",
66    "image_framework:image_native",
67    "ipc:ipc_core",
68    "power_manager:power_ffrt",
69    "power_manager:power_setting",
70    "power_manager:power_sysparam",
71    "safwk:system_ability_fwk",
72    "samgr:samgr_proxy",
73    "skia:skia_canvaskit",
74    "window_manager:libdm_lite",
75  ]
76
77  if (use_libfuzzer) {
78    defines += [ "FUZZ_TEST" ]
79  }
80
81  if (has_sensors_sensor_part) {
82    external_deps += [ "sensor:sensor_interface_native" ]
83    defines += [ "ENABLE_SENSOR_PART" ]
84  }
85  if (display_manager_feature_brightnessext != "") {
86    defines += [ "OHOS_BUILD_ENABLE_BRIGHTNESS_WRAPPER" ]
87  }
88  if (has_hiviewdfx_hisysevent_part) {
89    external_deps += [ "hisysevent:libhisysevent" ]
90  }
91  subsystem_name = "powermgr"
92  part_name = "${displaymgr_part_name}"
93}
94