• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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/test.gni")
15import("//foundation/resourceschedule/background_task_mgr/bgtaskmgr.gni")
16
17config("bgtaskmgr_service_public_config") {
18  include_dirs = [
19    "common/include",
20    "continuous_task/include",
21    "core/include",
22    "transient_task/include",
23    "test/include",
24    "efficiency_resources/include",
25    "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb/include",
26    "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk/include",
27  ]
28}
29
30ohos_shared_library("bgtaskmgr_service") {
31  cflags_cc = []
32  sources = [
33    "${bgtaskmgr_frameworks_path}/src/background_task_mgr_stub.cpp",
34    "${bgtaskmgr_frameworks_path}/src/background_task_subscriber_proxy.cpp",
35    "${bgtaskmgr_frameworks_path}/src/expired_callback_proxy.cpp",
36    "common/src/app_state_observer.cpp",
37    "common/src/bundle_manager_helper.cpp",
38    "common/src/data_storage_helper.cpp",
39    "common/src/system_event_observer.cpp",
40    "common/src/time_provider.cpp",
41    "continuous_task/src/bg_continuous_task_mgr.cpp",
42    "continuous_task/src/config_change_observer.cpp",
43    "continuous_task/src/continuous_task_record.cpp",
44    "continuous_task/src/notification_tools.cpp",
45    "core/src/background_task_mgr_service.cpp",
46    "efficiency_resources/src/bg_efficiency_resources_mgr.cpp",
47    "efficiency_resources/src/resource_application_record.cpp",
48    "efficiency_resources/src/resources_subscriber_mgr.cpp",
49    "transient_task/src/bg_transient_task_mgr.cpp",
50    "transient_task/src/bgtask_common.cpp",
51    "transient_task/src/decision_maker.cpp",
52    "transient_task/src/delay_suspend_info_ex.cpp",
53    "transient_task/src/device_info_manager.cpp",
54    "transient_task/src/event_hub.cpp",
55    "transient_task/src/input_manager.cpp",
56    "transient_task/src/pkg_delay_suspend_info.cpp",
57    "transient_task/src/suspend_controller.cpp",
58    "transient_task/src/timer_manager.cpp",
59    "transient_task/src/watchdog.cpp",
60  ]
61
62  public_configs = [ ":bgtaskmgr_service_public_config" ]
63
64  deps = [ "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits" ]
65
66  external_deps = [
67    "ability_base:base",
68    "ability_base:configuration",
69    "ability_base:want",
70    "ability_base:zuri",
71    "ability_runtime:app_manager",
72    "ability_runtime:wantagent_innerkits",
73    "access_token:libaccesstoken_sdk",
74    "bundle_framework:appexecfwk_base",
75    "bundle_framework:appexecfwk_core",
76    "c_utils:utils",
77    "common_event_service:cesfwk_innerkits",
78    "eventhandler:libeventhandler",
79    "hitrace_native:hitrace_meter",
80    "hiviewdfx_hilog_native:libhilog",
81    "init:libbegetutil",
82    "ipc:ipc_core",
83    "resource_management:global_resmgr",
84    "safwk:system_ability_fwk",
85    "samgr:samgr_proxy",
86  ]
87
88  if (has_os_account_part) {
89    cflags_cc += [ "-DHAS_OS_ACCOUNT_PART" ]
90    external_deps += [ "os_account:os_account_innerkits" ]
91  }
92
93  if (distributed_notification_enable) {
94    cflags_cc += [ "-DDISTRIBUTED_NOTIFICATION_ENABLE" ]
95    deps += [ "//base/notification/distributed_notification_service/frameworks/ans:ans_innerkits" ]
96    sources += [ "continuous_task/src/task_notification_subscriber.cpp" ]
97  }
98
99  if (background_task_mgr_graphics) {
100    cflags_cc += [ "-DSUPPORT_GRAPHICS" ]
101    deps += [ "//third_party/icu/icu4c:shared_icuuc" ]
102    external_deps += [ "i18n:intl_util" ]
103  }
104
105  part_name = "background_task_mgr"
106}
107