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("//build/ohos.gni") 15import("../../windowmanager_aafwk.gni") 16 17config("session_manager_public_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "${window_base_path}/interfaces/innerkits/wm", 22 "${window_base_path}/interfaces/include", 23 "${window_base_path}/window_scene", 24 "${window_base_path}/window_scene/common/include", 25 "${window_base_path}/window_scene/interfaces/include", 26 "${window_base_path}/window_scene/screen_session_manager/include", 27 "${window_base_path}/window_scene/screen_session_manager/include/zidl", 28 "${window_base_path}/window_scene/session_manager_service/include", 29 30 # for session_manager 31 "${window_base_path}/wmserver/include", 32 "${window_base_path}/wmserver/include/zidl", 33 34 # for screen_session_manager 35 "${window_base_path}/utils/include", 36 "${window_base_path}/dm/include", 37 "${window_base_path}/interfaces/innerkits/dm", 38 "${window_base_path}/dmserver/include", 39 40 # for scene session manager 41 "${window_base_path}/interfaces/innerkits/wm", 42 "${window_base_path}/wmserver/include", 43 "${window_base_path}/window_scene/screen_session_manager_client/include", 44 45 # for window_manager_hilog 46 "${window_base_path}/utils/include", 47 48 "${window_base_path}/wm/include", 49 "${window_base_path}/wm/include/zidl", 50 ] 51} 52 53ohos_shared_library("screen_session_manager") { 54 branch_protector_ret = "pac_ret" 55 sanitize = { 56 cfi = true 57 cfi_cross_dso = true 58 cfi_vcall_icall_only = true 59 debug = false 60 } 61 sources = [ 62 "../../dm/src/zidl/display_manager_agent_proxy.cpp", 63 "../screen_session_manager_client/src/zidl/screen_session_manager_client_proxy.cpp", 64 "src/connection/screen_cast_connection.cpp", 65 "src/connection/screen_session_ability_connection.cpp", 66 "src/connection/screen_snapshot_picker_connection.cpp", 67 "src/multi_screen_change_utils.cpp", 68 "src/multi_screen_mode_change_manager.cpp", 69 "src/multi_screen_power_change_manager.cpp", 70 "src/publish/screen_session_publish.cpp", 71 "src/screen_aod_plugin.cpp", 72 "src/screen_cutout_controller.cpp", 73 "src/screen_edid_parse.cpp", 74 "src/screen_power_utils.cpp", 75 "src/screen_rotation_property.cpp", 76 "src/screen_scene_config.cpp", 77 "src/screen_sensor_connector.cpp", 78 "src/screen_sensor_plugin.cpp", 79 "src/screen_session_dumper.cpp", 80 "src/screen_session_manager.cpp", 81 "src/screen_setting_helper.cpp", 82 "src/screen_tent_property.cpp", 83 "src/session_display_power_controller.cpp", 84 "src/setting_observer.cpp", 85 "src/setting_provider.cpp", 86 "src/zidl/screen_session_manager_stub.cpp", 87 ] 88 89 cflags_cc = [ "-std=c++17" ] 90 91 public_configs = [ ":session_manager_public_config" ] 92 public_external_deps = [ 93 "ability_runtime:session_handler", 94 "accessibility:accessibility_common", 95 "input:libmmi-client", 96 "input:libmmi-napi", 97 ] 98 deps = [ 99 "${window_base_path}/etc:wms_etc", 100 "${window_base_path}/utils:libwmutil", 101 "${window_base_path}/utils:libwmutil_base", 102 "${window_base_path}/window_scene/common:window_scene_common", 103 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 104 "${window_base_path}/window_scene/session:screen_session", 105 "${window_base_path}/wmserver:sms", 106 ] 107 108 external_deps = [ 109 "ability_base:base", 110 "ability_base:want", 111 "ability_base:zuri", 112 "ability_runtime:ability_connect_callback_stub", 113 "ability_runtime:ability_manager", 114 "ability_runtime:abilitykit_native", 115 "ability_runtime:app_manager", 116 "ability_runtime:dataobs_manager", 117 "ability_runtime:extension_manager", 118 "access_token:libaccesstoken_sdk", 119 "access_token:libprivacy_sdk", 120 "access_token:libtokenid_sdk", 121 "bundle_framework:appexecfwk_base", 122 "c_utils:utils", 123 "common_event_service:cesfwk_innerkits", 124 "config_policy:configpolicy_util", 125 "data_share:datashare_common", 126 "data_share:datashare_consumer", 127 "eventhandler:libeventhandler", 128 "graphic_2d:librender_service_base", 129 "graphic_2d:librender_service_client", 130 "hicollie:libhicollie", 131 "hilog:libhilog", 132 "hisysevent:libhisysevent", 133 "hitrace:hitrace_meter", 134 "init:libbeget_proxy", 135 "ipc:ipc_core", 136 "libxml2:libxml2", 137 "safwk:system_ability_fwk", 138 "samgr:samgr_proxy", 139 "screenlock_mgr:screenlock_client", 140 ] 141 142 defines = [] 143 if (window_manager_feature_subscribe_motion) { 144 if (defined(global_parts_info) && defined(global_parts_info.msdp_motion)) { 145 defines += [ "WM_SUBSCRIBE_MOTION_ENABLE" ] 146 } 147 } 148 149 if (defined(global_parts_info) && defined(global_parts_info.sensors_sensor)) { 150 external_deps += [ "sensor:sensor_interface_native" ] 151 defines += [ "SENSOR_ENABLE" ] 152 } 153 154 if (defined(global_parts_info) && 155 defined(global_parts_info.powermgr_power_manager)) { 156 external_deps += [ "power_manager:powermgr_client" ] 157 defines += [ "POWER_MANAGER_ENABLE" ] 158 } 159 160 if (defined(global_parts_info) && 161 defined(global_parts_info.powermgr_display_manager)) { 162 external_deps += [ "display_manager:displaymgr" ] 163 defines += [ "POWERMGR_DISPLAY_MANAGER_ENABLE" ] 164 } 165 166 if (window_manager_feature_tp_enable) { 167 defines += [ "TP_FEATURE_ENABLE" ] 168 } 169 170 if (is_standard_system) { 171 external_deps += [ "init:libbegetutil" ] 172 } else { 173 external_deps += [ "init_lite:libbegetutil" ] 174 } 175 176 if (device_status_enable) { 177 external_deps += [ "device_status:devicestatus_client" ] 178 defines += [ "DEVICE_STATUS_ENABLE" ] 179 } 180 181 if (defined(global_parts_info) && 182 defined(global_parts_info.resourceschedule_soc_perf)) { 183 external_deps += [ "resource_schedule_service:ressched_client" ] 184 defines += [ "RES_SCHED_ENABLE" ] 185 } 186 187 if (window_manager_fold_ability) { 188 defines += [ "FOLD_ABILITY_ENABLE" ] 189 sources += [ 190 "src/fold_screen_controller/dual_display_fold_policy.cpp", 191 "src/fold_screen_controller/fold_screen_controller.cpp", 192 "src/fold_screen_controller/fold_screen_policy.cpp", 193 "src/fold_screen_controller/fold_screen_sensor_manager.cpp", 194 "src/fold_screen_controller/fold_screen_state_machine.cpp", 195 "src/fold_screen_controller/secondary_display_fold_policy.cpp", 196 "src/fold_screen_controller/secondary_fold_sensor_manager.cpp", 197 "src/fold_screen_controller/sensor_fold_state_manager/dual_display_sensor_fold_state_manager.cpp", 198 "src/fold_screen_controller/sensor_fold_state_manager/secondary_display_sensor_fold_state_manager.cpp", 199 "src/fold_screen_controller/sensor_fold_state_manager/sensor_fold_state_manager.cpp", 200 "src/fold_screen_controller/sensor_fold_state_manager/single_display_sensor_fold_state_manager.cpp", 201 "src/fold_screen_controller/sensor_fold_state_manager/single_display_sensor_pocket_fold_state_manager.cpp", 202 "src/fold_screen_controller/single_display_fold_policy.cpp", 203 "src/fold_screen_controller/single_display_pocket_fold_policy.cpp", 204 "src/fold_screen_controller/super_fold_policy.cpp", 205 "src/fold_screen_controller/super_fold_sensor_manager.cpp", 206 "src/fold_screen_controller/super_fold_state_manager.cpp", 207 ] 208 print("window manager fold ability is enabled.") 209 } else { 210 print("window manager fold ability is disabled.") 211 } 212 213 if (window_manager_feature_screen_active_mode) { 214 defines += [ "WM_SCREEN_ACTIVE_MODE_ENABLE" ] 215 print("window manager active mode ability is enabled.") 216 } else { 217 print("window manager active mode ability is disabled.") 218 } 219 220 if (window_manager_feature_screen_color_gamut) { 221 defines += [ "WM_SCREEN_COLOR_GAMUT_ENABLE" ] 222 print("window manager screen color gamut ability is enabled.") 223 } else { 224 print("window manager screen color gamut ability is disabled.") 225 } 226 227 if (window_manager_feature_screen_hdr_format) { 228 defines += [ "WM_SCREEN_HDR_FORMAT_ENABLE" ] 229 print("window manager screen hdr format ability is enabled.") 230 } else { 231 print("window manager screen hdr format ability is disabled.") 232 } 233 234 if (window_manager_feature_screen_color_space) { 235 defines += [ "WM_SCREEN_COLOR_SPACE_ENABLE" ] 236 print("window manager screen color space ability is enabled.") 237 } else { 238 print("window manager screen color space ability is disabled.") 239 } 240 241 if (window_manager_feature_multi_screen) { 242 defines += [ "WM_MULTI_SCREEN_ENABLE" ] 243 sources += [ "src/multi_screen_manager.cpp" ] 244 print("window manager screen multi screen ability is enabled.") 245 } else { 246 print("window manager screen multi screen ability is disabled.") 247 } 248 249 if (window_manager_feature_multi_screen_frame_ctl) { 250 defines += [ "WM_MULTI_SCREEN_CTL_ABILITY_ENABLE" ] 251 print("window manager screen multi screen frame ctl ability is enabled.") 252 } else { 253 print("window manager screen multi screen frame ctl ability is disabled.") 254 } 255 256 if (window_manager_feature_cam_mode) { 257 defines += [ "WM_CAM_MODE_ABILITY_ENABLE" ] 258 print("window manager screen camera mode ability is enabled.") 259 } else { 260 print("window manager screen camera mode ability is disabled.") 261 } 262 263 if (window_manager_feature_multi_usr) { 264 defines += [ "WM_MULTI_USR_ABILITY_ENABLE" ] 265 print("window manager screen multi usr ability is enabled.") 266 } else { 267 print("window manager screen multi usr ability is disabled.") 268 } 269 270 innerapi_tags = [ "platformsdk" ] 271 part_name = "window_manager" 272 subsystem_name = "window" 273} 274