# Copyright (C) 2022-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") import("../wallpaper.gni") config("wallpaper_service_config") { visibility = [ ":*" ] include_dirs = [ "include", "${wallpaper_path}/utils/dfx/hisysevent_adapter", "${wallpaper_path}/utils/dfx/hidumper_adapter", ] cflags_cc = [] } ohos_shared_library("wallpaper_service") { sources = [ "src/component_name.cpp", "src/wallpaper_common_event_manager.cpp", "src/wallpaper_common_event_subscriber.cpp", "src/wallpaper_data.cpp", "src/wallpaper_event_listener_proxy.cpp", "src/wallpaper_service.cpp", "src/wallpaper_service_cb_proxy.cpp", "src/wallpaper_service_stub.cpp", ] public_configs = [ ":wallpaper_service_config" ] include_dirs = [ "${wallpaper_path}/frameworks/native/include", "${wallpaper_path}/utils/include", "${graphic_2d_path}/rosen/modules/effect/color_picker/include", "${graphic_2d_path}/utils/color_manager", ] deps = [ "${utils_path}:wallpaper_utils" ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:ability_connect_callback_stub", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "config_policy:configpolicy_util", "eventhandler:libeventhandler", "graphic_2d:color_manager", "graphic_2d:color_picker", "hilog:libhilog", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_single", "memmgr:memmgrclient", "os_account:os_account_innerkits", "safwk:system_ability_fwk", "samgr:samgr_proxy", "window_manager:libwsutils", ] sanitize = { cfi = true cfi_cross_dso = true debug = false integer_overflow = true boundary_sanitize = true ubsan = true } branch_protector_ret = "pac_ret" if (ability_runtime_graphics) { external_deps += [ "image_framework:image_native" ] } defines = [] if (theme_service) { defines += [ "THEME_SERVICE" ] } else { external_deps += [ "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", ] sources += [ "src/wallpaper_extension_ability_connection.cpp", "src/wallpaper_extension_ability_death_recipient.cpp", ] } subsystem_name = "theme" part_name = "wallpaper_mgr" }