# Copyright (c) 2021-2022 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") config("appmgr_config") { include_dirs = [ "include", "${ability_runtime_services_path}/common/include", "${appspawn_path}/interfaces/innerkits/include", "${ability_runtime_path}/tools/aa/include", ] } group("appms_target") { deps = [ ":libappms" ] } ohos_shared_library("libappms") { sources = [ "src/ability_running_record.cpp", "src/ams_mgr_scheduler.cpp", "src/app_death_recipient.cpp", "src/app_lifecycle_deal.cpp", "src/app_mgr_service.cpp", "src/app_mgr_service_event_handler.cpp", "src/app_mgr_service_inner.cpp", "src/app_process_manager.cpp", "src/app_running_manager.cpp", "src/app_running_record.cpp", "src/app_spawn_client.cpp", "src/app_spawn_msg_wrapper.cpp", "src/app_spawn_socket.cpp", "src/app_state_observer_manager.cpp", "src/module_running_record.cpp", "src/quick_fix_callback_with_record.cpp", "src/remote_client_manager.cpp", "src/window_focus_changed_listener.cpp", ] defines = [ "AMS_LOG_TAG = \"AppMgrService\"" ] if (ability_command_for_test) { defines += [ "ABILITY_COMMAND_FOR_TEST" ] } configs = [ ":appmgr_config" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } deps = [ "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", "${ability_runtime_services_path}/common:event_report", "${ability_runtime_services_path}/common:perm_verification", ] external_deps = [ "ability_base:base", "ability_base:configuration", "ability_base:want", "ability_runtime:ability_deps_wrapper", "ability_runtime:app_manager", "access_token:libaccesstoken_sdk", "appspawn:appspawn_socket_client", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", "hiviewdfx_hilog_native:libhilog", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (ability_runtime_graphics) { defines += [ "SUPPORT_GRAPHICS" ] deps += [] external_deps += [ "i18n:intl_util", "window_manager:libwm", ] } if (background_task_mgr_continuous_task_enable) { defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ] } if (is_asan) { defines += [ "SUPPORT_ASAN" ] } version_script = "libappms.map" subsystem_name = "ability" part_name = "ability_runtime" }