diff --git a/BUILD.gn b/BUILD.gn index 2c6f02bc86bb54d58ee7eec96c3edf823ee534e5..c17630fb90e8b712edd091becfb27238bccf2223 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -39,13 +39,12 @@ ohos_shared_library("usagestatsinner") { "services/packageusage/src/bundle_active_package_stats.cpp", ] public_configs = [ ":usagestatsinner_public_config" ] - public_deps = [ ":usagestatservice" ] + deps = [ ":usagestatservice" ] external_deps = [ "c_utils:utils", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", - "safwk:system_ability_fwk", "samgr:samgr_proxy", ] @@ -73,6 +72,7 @@ ohos_shared_library("bundlestate") { "interfaces/innerkits/include", "services/packageusage/include", "services/packagegroup/include", + "//base/notification/eventhandler/interfaces/inner_api", ] deps = [ @@ -82,12 +82,9 @@ ohos_shared_library("bundlestate") { external_deps = [ "c_utils:utils", - "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "napi:ace_napi", - "safwk:system_ability_fwk", - "samgr:samgr_proxy", ] relative_install_dir = "module" part_name = "${device_usage_statistics_part_name}" @@ -141,15 +138,14 @@ ohos_shared_library("usagestatservice") { "interfaces/kits/bundlestats/napi/include", ] + configs = [ "//foundation/ability/ability_runtime/interfaces/inner_api/wantagent:wantagent_innerkits_public_config" ] + external_deps = [ - "ability_base:configuration", "ability_base:want", "ability_runtime:app_manager", - "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "background_task_mgr:bgtaskmgr_innerkits", "bundle_framework:appexecfwk_base", - "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", diff --git a/services/common/include/bundle_active_service.h b/services/common/include/bundle_active_service.h index ebe6615a511bac3b0b0c26af20b27304d643e221..bd49a3f65fa1e5c912c0c4e101f62ae13f232405 100644 --- a/services/common/include/bundle_active_service.h +++ b/services/common/include/bundle_active_service.h @@ -30,6 +30,7 @@ #include "bundle_active_account_helper.h" #include "file_ex.h" #include "string_ex.h" +#include "system_ability.h" namespace OHOS { namespace DeviceUsageStats { diff --git a/services/common/include/ibundle_active_service.h b/services/common/include/ibundle_active_service.h index fe1f87c4a0153f65b6bd928cacac2e37f4c8b56a..d8096a968eba31c21b1c77ae7e4fe617432ef902 100644 --- a/services/common/include/ibundle_active_service.h +++ b/services/common/include/ibundle_active_service.h @@ -28,7 +28,6 @@ #include "iremote_proxy.h" #include "iremote_object.h" #include "ipc_skeleton.h" -#include "system_ability.h" #include "system_ability_definition.h" #include "if_system_ability_manager.h" #include "iservice_registry.h" diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 1db38cd2f821781f92e6d8cb2d7b2952b3795570..4151a21640e79b945e16648b1828548c1e01baf7 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -34,6 +34,7 @@ ohos_unittest("DeviceUsageStatsTest") { configs = [ ":module_private_config" ] deps = [ + "//foundation/resourceschedule/device_usage_statistics:usagestatservice", "//foundation/resourceschedule/device_usage_statistics:usagestatsinner", ]