122c0b7e4Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 222c0b7e4Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 322c0b7e4Sopenharmony_ci# you may not use this file except in compliance with the License. 422c0b7e4Sopenharmony_ci# You may obtain a copy of the License at 522c0b7e4Sopenharmony_ci# 622c0b7e4Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 722c0b7e4Sopenharmony_ci# 822c0b7e4Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 922c0b7e4Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1022c0b7e4Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1122c0b7e4Sopenharmony_ci# See the License for the specific language governing permissions and 1222c0b7e4Sopenharmony_ci# limitations under the License. 1322c0b7e4Sopenharmony_ci 1422c0b7e4Sopenharmony_ciimport("//build/ohos/sa_profile/sa_profile.gni") 1522c0b7e4Sopenharmony_ciimport("device_usage_statistics.gni") 1622c0b7e4Sopenharmony_ci 1722c0b7e4Sopenharmony_ciohos_sa_profile("device_usage_statistics_sa_profile") { 1822c0b7e4Sopenharmony_ci sources = [ "sa_profile/1907.json" ] 1922c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 2022c0b7e4Sopenharmony_ci} 2122c0b7e4Sopenharmony_ci 2222c0b7e4Sopenharmony_ciconfig("usagestats_public_config") { 2322c0b7e4Sopenharmony_ci include_dirs = [ 2422c0b7e4Sopenharmony_ci "interfaces/innerkits/include", 2522c0b7e4Sopenharmony_ci "interfaces/kits/bundlestats/napi/include", 2622c0b7e4Sopenharmony_ci "services/common/include", 2722c0b7e4Sopenharmony_ci "services/packagegroup/include", 2822c0b7e4Sopenharmony_ci "services/packageusage/include", 2922c0b7e4Sopenharmony_ci ] 3022c0b7e4Sopenharmony_ci} 3122c0b7e4Sopenharmony_ci 3222c0b7e4Sopenharmony_ciconfig("usagestatsutils_config") { 3322c0b7e4Sopenharmony_ci include_dirs = [ "utils/include" ] 3422c0b7e4Sopenharmony_ci} 3522c0b7e4Sopenharmony_ci 3622c0b7e4Sopenharmony_ciohos_shared_library("usagestatsinner") { 3722c0b7e4Sopenharmony_ci sources = [ 3822c0b7e4Sopenharmony_ci "interfaces/innerkits/src/app_group_callback_info.cpp", 3922c0b7e4Sopenharmony_ci "interfaces/innerkits/src/app_group_callback_proxy.cpp", 4022c0b7e4Sopenharmony_ci "interfaces/innerkits/src/app_group_callback_stub.cpp", 4122c0b7e4Sopenharmony_ci "interfaces/innerkits/src/bundle_active_client.cpp", 4222c0b7e4Sopenharmony_ci "interfaces/innerkits/src/bundle_active_event.cpp", 4322c0b7e4Sopenharmony_ci "interfaces/innerkits/src/bundle_active_event_stats.cpp", 4422c0b7e4Sopenharmony_ci "interfaces/innerkits/src/bundle_active_form_record.cpp", 4522c0b7e4Sopenharmony_ci "interfaces/innerkits/src/bundle_active_module_record.cpp", 4622c0b7e4Sopenharmony_ci "interfaces/innerkits/src/bundle_active_package_stats.cpp", 4722c0b7e4Sopenharmony_ci "interfaces/innerkits/src/bundle_active_proxy.cpp", 4822c0b7e4Sopenharmony_ci ] 4922c0b7e4Sopenharmony_ci public_configs = [ ":usagestats_public_config" ] 5022c0b7e4Sopenharmony_ci deps = [ ":usagestatsutils" ] 5122c0b7e4Sopenharmony_ci external_deps = [ 5222c0b7e4Sopenharmony_ci "c_utils:utils", 5322c0b7e4Sopenharmony_ci "eventhandler:libeventhandler", 5422c0b7e4Sopenharmony_ci "ffrt:libffrt", 5522c0b7e4Sopenharmony_ci "hilog:libhilog", 5622c0b7e4Sopenharmony_ci "ipc:ipc_single", 5722c0b7e4Sopenharmony_ci "samgr:samgr_proxy", 5822c0b7e4Sopenharmony_ci ] 5922c0b7e4Sopenharmony_ci 6022c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 6122c0b7e4Sopenharmony_ci subsystem_name = "resourceschedule" 6222c0b7e4Sopenharmony_ci innerapi_tags = [ "platformsdk" ] 6322c0b7e4Sopenharmony_ci version_script = "libusagestatsinner.versionscript" 6422c0b7e4Sopenharmony_ci branch_protector_ret = "pac_ret" 6522c0b7e4Sopenharmony_ci 6622c0b7e4Sopenharmony_ci sanitize = { 6722c0b7e4Sopenharmony_ci cfi = true 6822c0b7e4Sopenharmony_ci cfi_cross_dso = true 6922c0b7e4Sopenharmony_ci debug = false 7022c0b7e4Sopenharmony_ci } 7122c0b7e4Sopenharmony_ci} 7222c0b7e4Sopenharmony_ci 7322c0b7e4Sopenharmony_ciohos_prebuilt_etc("device_usage_statistics_service_init") { 7422c0b7e4Sopenharmony_ci source = "init/device_usage_statistics_service.cfg" 7522c0b7e4Sopenharmony_ci relative_install_dir = "init" 7622c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 7722c0b7e4Sopenharmony_ci subsystem_name = "resourceschedule" 7822c0b7e4Sopenharmony_ci} 7922c0b7e4Sopenharmony_ci 8022c0b7e4Sopenharmony_ciohos_shared_library("bundlestate") { 8122c0b7e4Sopenharmony_ci sources = [ 8222c0b7e4Sopenharmony_ci "frameworks/src/bundle_state_common.cpp", 8322c0b7e4Sopenharmony_ci "frameworks/src/bundle_state_init.cpp", 8422c0b7e4Sopenharmony_ci "frameworks/src/bundle_state_query.cpp", 8522c0b7e4Sopenharmony_ci ] 8622c0b7e4Sopenharmony_ci include_dirs = [ 8722c0b7e4Sopenharmony_ci "interfaces/innerkits/include", 8822c0b7e4Sopenharmony_ci "interfaces/kits/bundlestats/napi/include", 8922c0b7e4Sopenharmony_ci "services/common/include", 9022c0b7e4Sopenharmony_ci "services/packagegroup/include", 9122c0b7e4Sopenharmony_ci "services/packageusage/include", 9222c0b7e4Sopenharmony_ci ] 9322c0b7e4Sopenharmony_ci 9422c0b7e4Sopenharmony_ci deps = [ 9522c0b7e4Sopenharmony_ci ":usagestatsinner", 9622c0b7e4Sopenharmony_ci ":usagestatsutils", 9722c0b7e4Sopenharmony_ci ] 9822c0b7e4Sopenharmony_ci 9922c0b7e4Sopenharmony_ci external_deps = [ 10022c0b7e4Sopenharmony_ci "c_utils:utils", 10122c0b7e4Sopenharmony_ci "eventhandler:libeventhandler", 10222c0b7e4Sopenharmony_ci "hilog:libhilog", 10322c0b7e4Sopenharmony_ci "ipc:ipc_single", 10422c0b7e4Sopenharmony_ci "napi:ace_napi", 10522c0b7e4Sopenharmony_ci "samgr:samgr_proxy", 10622c0b7e4Sopenharmony_ci ] 10722c0b7e4Sopenharmony_ci relative_install_dir = "module" 10822c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 10922c0b7e4Sopenharmony_ci subsystem_name = "resourceschedule" 11022c0b7e4Sopenharmony_ci branch_protector_ret = "pac_ret" 11122c0b7e4Sopenharmony_ci 11222c0b7e4Sopenharmony_ci sanitize = { 11322c0b7e4Sopenharmony_ci cfi = true 11422c0b7e4Sopenharmony_ci cfi_cross_dso = true 11522c0b7e4Sopenharmony_ci debug = false 11622c0b7e4Sopenharmony_ci } 11722c0b7e4Sopenharmony_ci} 11822c0b7e4Sopenharmony_ci 11922c0b7e4Sopenharmony_ciohos_shared_library("usagestatistics") { 12022c0b7e4Sopenharmony_ci sources = [ 12122c0b7e4Sopenharmony_ci "frameworks/src/app_group_observer_napi.cpp", 12222c0b7e4Sopenharmony_ci "frameworks/src/bundle_active_app_group_napi.cpp", 12322c0b7e4Sopenharmony_ci "frameworks/src/bundle_state_common.cpp", 12422c0b7e4Sopenharmony_ci "frameworks/src/bundle_state_query_napi.cpp", 12522c0b7e4Sopenharmony_ci "frameworks/src/usage_statistics_init.cpp", 12622c0b7e4Sopenharmony_ci ] 12722c0b7e4Sopenharmony_ci include_dirs = [ 12822c0b7e4Sopenharmony_ci "interfaces/innerkits/include", 12922c0b7e4Sopenharmony_ci "interfaces/kits/bundlestats/napi/include", 13022c0b7e4Sopenharmony_ci "services/common/include", 13122c0b7e4Sopenharmony_ci "services/packagegroup/include", 13222c0b7e4Sopenharmony_ci "services/packageusage/include", 13322c0b7e4Sopenharmony_ci ] 13422c0b7e4Sopenharmony_ci 13522c0b7e4Sopenharmony_ci deps = [ 13622c0b7e4Sopenharmony_ci ":usagestatsinner", 13722c0b7e4Sopenharmony_ci ":usagestatsutils", 13822c0b7e4Sopenharmony_ci ] 13922c0b7e4Sopenharmony_ci 14022c0b7e4Sopenharmony_ci external_deps = [ 14122c0b7e4Sopenharmony_ci "c_utils:utils", 14222c0b7e4Sopenharmony_ci "eventhandler:libeventhandler", 14322c0b7e4Sopenharmony_ci "ffrt:libffrt", 14422c0b7e4Sopenharmony_ci "hilog:libhilog", 14522c0b7e4Sopenharmony_ci "ipc:ipc_single", 14622c0b7e4Sopenharmony_ci "napi:ace_napi", 14722c0b7e4Sopenharmony_ci "samgr:samgr_proxy", 14822c0b7e4Sopenharmony_ci ] 14922c0b7e4Sopenharmony_ci relative_install_dir = "module/resourceschedule" 15022c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 15122c0b7e4Sopenharmony_ci subsystem_name = "resourceschedule" 15222c0b7e4Sopenharmony_ci branch_protector_ret = "pac_ret" 15322c0b7e4Sopenharmony_ci 15422c0b7e4Sopenharmony_ci sanitize = { 15522c0b7e4Sopenharmony_ci cfi = true 15622c0b7e4Sopenharmony_ci cfi_cross_dso = true 15722c0b7e4Sopenharmony_ci debug = false 15822c0b7e4Sopenharmony_ci } 15922c0b7e4Sopenharmony_ci} 16022c0b7e4Sopenharmony_ci 16122c0b7e4Sopenharmony_ciohos_shared_library("usagestatservice") { 16222c0b7e4Sopenharmony_ci if (!use_clang_coverage) { 16322c0b7e4Sopenharmony_ci shlib_type = "sa" 16422c0b7e4Sopenharmony_ci } 16522c0b7e4Sopenharmony_ci 16622c0b7e4Sopenharmony_ci cflags_cc = [] 16722c0b7e4Sopenharmony_ci sources = [ 16822c0b7e4Sopenharmony_ci "services/common/src/bundle_active_account_helper.cpp", 16922c0b7e4Sopenharmony_ci "services/common/src/bundle_active_app_state_obsever.cpp", 17022c0b7e4Sopenharmony_ci "services/common/src/bundle_active_binary_search.cpp", 17122c0b7e4Sopenharmony_ci "services/common/src/bundle_active_bundle_mgr_helper.cpp", 17222c0b7e4Sopenharmony_ci "services/common/src/bundle_active_continuous_task_observer.cpp", 17322c0b7e4Sopenharmony_ci "services/common/src/bundle_active_core.cpp", 17422c0b7e4Sopenharmony_ci "services/common/src/bundle_active_debug_mode.cpp", 17522c0b7e4Sopenharmony_ci "services/common/src/bundle_active_open_callback.cpp", 17622c0b7e4Sopenharmony_ci "services/common/src/bundle_active_power_state_callback_service.cpp", 17722c0b7e4Sopenharmony_ci "services/common/src/bundle_active_service.cpp", 17822c0b7e4Sopenharmony_ci "services/common/src/bundle_active_shutdown_callback_service.cpp", 17922c0b7e4Sopenharmony_ci "services/common/src/bundle_active_stub.cpp", 18022c0b7e4Sopenharmony_ci "services/common/src/bundle_active_usage_database.cpp", 18122c0b7e4Sopenharmony_ci "services/packagegroup/src/bundle_active_group_controller.cpp", 18222c0b7e4Sopenharmony_ci "services/packagegroup/src/bundle_active_group_handler.cpp", 18322c0b7e4Sopenharmony_ci "services/packagegroup/src/bundle_active_user_history.cpp", 18422c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_calendar.cpp", 18522c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_event_list.cpp", 18622c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_event_tracker.cpp", 18722c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_period_stats.cpp", 18822c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_report_handler.cpp", 18922c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_stats_combiner.cpp", 19022c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_user_service.cpp", 19122c0b7e4Sopenharmony_ci ] 19222c0b7e4Sopenharmony_ci public_configs = [ ":usagestats_public_config" ] 19322c0b7e4Sopenharmony_ci 19422c0b7e4Sopenharmony_ci deps = [ 19522c0b7e4Sopenharmony_ci ":usagestatsinner", 19622c0b7e4Sopenharmony_ci ":usagestatsutils", 19722c0b7e4Sopenharmony_ci ] 19822c0b7e4Sopenharmony_ci 19922c0b7e4Sopenharmony_ci external_deps = [ 20022c0b7e4Sopenharmony_ci "ability_base:want", 20122c0b7e4Sopenharmony_ci "ability_runtime:app_manager", 20222c0b7e4Sopenharmony_ci "ability_runtime:wantagent_innerkits", 20322c0b7e4Sopenharmony_ci "access_token:libaccesstoken_sdk", 20422c0b7e4Sopenharmony_ci "access_token:libtokenid_sdk", 20522c0b7e4Sopenharmony_ci "bundle_framework:appexecfwk_base", 20622c0b7e4Sopenharmony_ci "bundle_framework:appexecfwk_core", 20722c0b7e4Sopenharmony_ci "c_utils:utils", 20822c0b7e4Sopenharmony_ci "common_event_service:cesfwk_innerkits", 20922c0b7e4Sopenharmony_ci "eventhandler:libeventhandler", 21022c0b7e4Sopenharmony_ci "ffrt:libffrt", 21122c0b7e4Sopenharmony_ci "hilog:libhilog", 21222c0b7e4Sopenharmony_ci "init:libbegetutil", 21322c0b7e4Sopenharmony_ci "ipc:ipc_single", 21422c0b7e4Sopenharmony_ci "relational_store:native_rdb", 21522c0b7e4Sopenharmony_ci "safwk:system_ability_fwk", 21622c0b7e4Sopenharmony_ci "samgr:samgr_proxy", 21722c0b7e4Sopenharmony_ci "time_service:time_client", 21822c0b7e4Sopenharmony_ci ] 21922c0b7e4Sopenharmony_ci 22022c0b7e4Sopenharmony_ci if (os_account_part_enabled) { 22122c0b7e4Sopenharmony_ci cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] 22222c0b7e4Sopenharmony_ci external_deps += [ "os_account:os_account_innerkits" ] 22322c0b7e4Sopenharmony_ci } 22422c0b7e4Sopenharmony_ci 22522c0b7e4Sopenharmony_ci defines = [] 22622c0b7e4Sopenharmony_ci if (bgtaskmgr_enable) { 22722c0b7e4Sopenharmony_ci external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 22822c0b7e4Sopenharmony_ci defines += [ "BGTASKMGR_ENABLE" ] 22922c0b7e4Sopenharmony_ci } 23022c0b7e4Sopenharmony_ci if (device_usage_statistics_with_powermgr_power_manager_enable) { 23122c0b7e4Sopenharmony_ci defines += [ "DEVICE_USAGES_STATISTICS_POWERMANGER_ENABLE" ] 23222c0b7e4Sopenharmony_ci external_deps += [ "power_manager:powermgr_client" ] 23322c0b7e4Sopenharmony_ci } 23422c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 23522c0b7e4Sopenharmony_ci subsystem_name = "resourceschedule" 23622c0b7e4Sopenharmony_ci branch_protector_ret = "pac_ret" 23722c0b7e4Sopenharmony_ci 23822c0b7e4Sopenharmony_ci sanitize = { 23922c0b7e4Sopenharmony_ci cfi = true 24022c0b7e4Sopenharmony_ci cfi_cross_dso = true 24122c0b7e4Sopenharmony_ci debug = false 24222c0b7e4Sopenharmony_ci } 24322c0b7e4Sopenharmony_ci} 24422c0b7e4Sopenharmony_ci 24522c0b7e4Sopenharmony_ciohos_static_library("usagestatservice_static") { 24622c0b7e4Sopenharmony_ci cflags_cc = [ "-DDEVICE_USAGE_UNIT_TEST" ] 24722c0b7e4Sopenharmony_ci 24822c0b7e4Sopenharmony_ci sources = [ 24922c0b7e4Sopenharmony_ci "services/common/src/bundle_active_account_helper.cpp", 25022c0b7e4Sopenharmony_ci "services/common/src/bundle_active_app_state_obsever.cpp", 25122c0b7e4Sopenharmony_ci "services/common/src/bundle_active_binary_search.cpp", 25222c0b7e4Sopenharmony_ci "services/common/src/bundle_active_bundle_mgr_helper.cpp", 25322c0b7e4Sopenharmony_ci "services/common/src/bundle_active_continuous_task_observer.cpp", 25422c0b7e4Sopenharmony_ci "services/common/src/bundle_active_core.cpp", 25522c0b7e4Sopenharmony_ci "services/common/src/bundle_active_debug_mode.cpp", 25622c0b7e4Sopenharmony_ci "services/common/src/bundle_active_open_callback.cpp", 25722c0b7e4Sopenharmony_ci "services/common/src/bundle_active_power_state_callback_service.cpp", 25822c0b7e4Sopenharmony_ci "services/common/src/bundle_active_service.cpp", 25922c0b7e4Sopenharmony_ci "services/common/src/bundle_active_shutdown_callback_service.cpp", 26022c0b7e4Sopenharmony_ci "services/common/src/bundle_active_stub.cpp", 26122c0b7e4Sopenharmony_ci "services/common/src/bundle_active_usage_database.cpp", 26222c0b7e4Sopenharmony_ci "services/packagegroup/src/bundle_active_group_controller.cpp", 26322c0b7e4Sopenharmony_ci "services/packagegroup/src/bundle_active_group_handler.cpp", 26422c0b7e4Sopenharmony_ci "services/packagegroup/src/bundle_active_user_history.cpp", 26522c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_calendar.cpp", 26622c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_event_list.cpp", 26722c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_event_tracker.cpp", 26822c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_period_stats.cpp", 26922c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_report_handler.cpp", 27022c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_stats_combiner.cpp", 27122c0b7e4Sopenharmony_ci "services/packageusage/src/bundle_active_user_service.cpp", 27222c0b7e4Sopenharmony_ci ] 27322c0b7e4Sopenharmony_ci public_configs = [ ":usagestats_public_config" ] 27422c0b7e4Sopenharmony_ci 27522c0b7e4Sopenharmony_ci deps = [ 27622c0b7e4Sopenharmony_ci ":usagestatsinner", 27722c0b7e4Sopenharmony_ci ":usagestatsutils", 27822c0b7e4Sopenharmony_ci ] 27922c0b7e4Sopenharmony_ci 28022c0b7e4Sopenharmony_ci external_deps = [ 28122c0b7e4Sopenharmony_ci "ability_base:want", 28222c0b7e4Sopenharmony_ci "ability_runtime:app_manager", 28322c0b7e4Sopenharmony_ci "ability_runtime:wantagent_innerkits", 28422c0b7e4Sopenharmony_ci "access_token:libaccesstoken_sdk", 28522c0b7e4Sopenharmony_ci "access_token:libtokenid_sdk", 28622c0b7e4Sopenharmony_ci "bundle_framework:appexecfwk_base", 28722c0b7e4Sopenharmony_ci "bundle_framework:appexecfwk_core", 28822c0b7e4Sopenharmony_ci "c_utils:utils", 28922c0b7e4Sopenharmony_ci "common_event_service:cesfwk_innerkits", 29022c0b7e4Sopenharmony_ci "eventhandler:libeventhandler", 29122c0b7e4Sopenharmony_ci "ffrt:libffrt", 29222c0b7e4Sopenharmony_ci "hilog:libhilog", 29322c0b7e4Sopenharmony_ci "init:libbegetutil", 29422c0b7e4Sopenharmony_ci "ipc:ipc_single", 29522c0b7e4Sopenharmony_ci "relational_store:native_rdb", 29622c0b7e4Sopenharmony_ci "safwk:system_ability_fwk", 29722c0b7e4Sopenharmony_ci "samgr:samgr_proxy", 29822c0b7e4Sopenharmony_ci "time_service:time_client", 29922c0b7e4Sopenharmony_ci ] 30022c0b7e4Sopenharmony_ci 30122c0b7e4Sopenharmony_ci if (os_account_part_enabled) { 30222c0b7e4Sopenharmony_ci cflags_cc += [ "-DOS_ACCOUNT_PART_ENABLED" ] 30322c0b7e4Sopenharmony_ci external_deps += [ "os_account:os_account_innerkits" ] 30422c0b7e4Sopenharmony_ci } 30522c0b7e4Sopenharmony_ci 30622c0b7e4Sopenharmony_ci defines = [] 30722c0b7e4Sopenharmony_ci if (bgtaskmgr_enable) { 30822c0b7e4Sopenharmony_ci external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 30922c0b7e4Sopenharmony_ci defines += [ "BGTASKMGR_ENABLE" ] 31022c0b7e4Sopenharmony_ci } 31122c0b7e4Sopenharmony_ci if (device_usage_statistics_with_powermgr_power_manager_enable) { 31222c0b7e4Sopenharmony_ci defines += [ "DEVICE_USAGES_STATISTICS_POWERMANGER_ENABLE" ] 31322c0b7e4Sopenharmony_ci external_deps += [ "power_manager:powermgr_client" ] 31422c0b7e4Sopenharmony_ci } 31522c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 31622c0b7e4Sopenharmony_ci subsystem_name = "resourceschedule" 31722c0b7e4Sopenharmony_ci branch_protector_ret = "pac_ret" 31822c0b7e4Sopenharmony_ci 31922c0b7e4Sopenharmony_ci sanitize = { 32022c0b7e4Sopenharmony_ci cfi = true 32122c0b7e4Sopenharmony_ci cfi_cross_dso = true 32222c0b7e4Sopenharmony_ci debug = false 32322c0b7e4Sopenharmony_ci } 32422c0b7e4Sopenharmony_ci} 32522c0b7e4Sopenharmony_ci 32622c0b7e4Sopenharmony_ciohos_shared_library("usagestatsutils") { 32722c0b7e4Sopenharmony_ci sources = [ 32822c0b7e4Sopenharmony_ci "utils/src/bundle_active_log.cpp", 32922c0b7e4Sopenharmony_ci "utils/src/bundle_active_util.cpp", 33022c0b7e4Sopenharmony_ci ] 33122c0b7e4Sopenharmony_ci public_configs = [ ":usagestatsutils_config" ] 33222c0b7e4Sopenharmony_ci 33322c0b7e4Sopenharmony_ci external_deps = [ 33422c0b7e4Sopenharmony_ci "c_utils:utils", 33522c0b7e4Sopenharmony_ci "hilog:libhilog", 33622c0b7e4Sopenharmony_ci ] 33722c0b7e4Sopenharmony_ci innerapi_tags = [ "platformsdk" ] 33822c0b7e4Sopenharmony_ci part_name = "${device_usage_statistics_part_name}" 33922c0b7e4Sopenharmony_ci subsystem_name = "resourceschedule" 34022c0b7e4Sopenharmony_ci branch_protector_ret = "pac_ret" 34122c0b7e4Sopenharmony_ci 34222c0b7e4Sopenharmony_ci sanitize = { 34322c0b7e4Sopenharmony_ci cfi = true 34422c0b7e4Sopenharmony_ci cfi_cross_dso = true 34522c0b7e4Sopenharmony_ci debug = false 34622c0b7e4Sopenharmony_ci } 34722c0b7e4Sopenharmony_ci} 34822c0b7e4Sopenharmony_ci 34922c0b7e4Sopenharmony_cigroup("bfwk_group_all") { 35022c0b7e4Sopenharmony_ci if (device_usage_statistics_device_enable) { 35122c0b7e4Sopenharmony_ci deps = [ 35222c0b7e4Sopenharmony_ci "${usage_statistics_path}:bundlestate", 35322c0b7e4Sopenharmony_ci "${usage_statistics_path}:usagestatsinner", 35422c0b7e4Sopenharmony_ci "${usage_statistics_path}:usagestatsutils", 35522c0b7e4Sopenharmony_ci ] 35622c0b7e4Sopenharmony_ci } 35722c0b7e4Sopenharmony_ci} 35822c0b7e4Sopenharmony_ci 35922c0b7e4Sopenharmony_cigroup("service_group_all") { 36022c0b7e4Sopenharmony_ci if (device_usage_statistics_device_enable) { 36122c0b7e4Sopenharmony_ci deps = [ 36222c0b7e4Sopenharmony_ci "${usage_statistics_path}:device_usage_statistics_sa_profile", 36322c0b7e4Sopenharmony_ci "${usage_statistics_path}:device_usage_statistics_service_init", 36422c0b7e4Sopenharmony_ci "${usage_statistics_path}:usagestatistics", 36522c0b7e4Sopenharmony_ci "${usage_statistics_path}:usagestatservice", 36622c0b7e4Sopenharmony_ci ] 36722c0b7e4Sopenharmony_ci } 36822c0b7e4Sopenharmony_ci} 36922c0b7e4Sopenharmony_ci 37022c0b7e4Sopenharmony_cigroup("test_all") { 37122c0b7e4Sopenharmony_ci testonly = true 37222c0b7e4Sopenharmony_ci if (device_usage_statistics_device_enable) { 37322c0b7e4Sopenharmony_ci deps = [ 37422c0b7e4Sopenharmony_ci "${usage_statistics_path}/interfaces/test/unittest/device_usage_statistics_jsunittest:js_unittest", 37522c0b7e4Sopenharmony_ci "${usage_statistics_path}/test/fuzztest/appgroupcallbackstub_fuzzer:fuzztest", 37622c0b7e4Sopenharmony_ci "${usage_statistics_path}/test/fuzztest/bundleactiveobserver_fuzzer:fuzztest", 37722c0b7e4Sopenharmony_ci "${usage_statistics_path}/test/fuzztest/bundleactiveonremoterequest_fuzzer:fuzztest", 37822c0b7e4Sopenharmony_ci "${usage_statistics_path}/test/fuzztest/bundleactivepowerstatecallbackproxy_fuzzer:fuzztest", 37922c0b7e4Sopenharmony_ci "${usage_statistics_path}/test/unittest:unittest", 38022c0b7e4Sopenharmony_ci ] 38122c0b7e4Sopenharmony_ci } 38222c0b7e4Sopenharmony_ci} 383