From 4bcd7b5dcd7682a736eef6a3dbdc1aee8b59be83 Mon Sep 17 00:00:00 2001 From: fengyang Date: Mon, 21 Apr 2025 20:30:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fengyang --- BUILD.gn | 5 - bundle.json | 3 - .../BUILD.gn | 3 +- .../include/bundle_active_usage_database.h | 2 +- .../src/bundle_active_app_state_obsever.cpp | 6 - services/common/src/bundle_active_stub.cpp | 322 ------------------ .../src/bundle_active_usage_database.cpp | 1 - .../src/bundle_active_group_controller.cpp | 2 +- .../appgroupcallbackstub_fuzzer/BUILD.gn | 2 - .../bundleactiveobserver_fuzzer/BUILD.gn | 2 - .../BUILD.gn | 2 - .../BUILD.gn | 2 - test/unittest/bundle_active_total_test.cpp | 4 +- 13 files changed, 5 insertions(+), 351 deletions(-) delete mode 100644 services/common/src/bundle_active_stub.cpp diff --git a/BUILD.gn b/BUILD.gn index bea2cad..1bbfae8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -87,7 +87,6 @@ ohos_shared_library("usagestatsinner") { "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", - "hitrace:hitrace_meter", "ipc:ipc_core", "ipc:ipc_single", "samgr:samgr_proxy", @@ -148,11 +147,9 @@ ohos_shared_library("bundlestate") { external_deps = [ "c_utils:utils", - "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_single", "napi:ace_napi", - "samgr:samgr_proxy", ] public_external_deps = [ "ffrt:libffrt" ] relative_install_dir = "module" @@ -197,12 +194,10 @@ ohos_shared_library("usagestatistics") { external_deps = [ "c_utils:utils", - "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "ipc:ipc_single", "napi:ace_napi", - "samgr:samgr_proxy", ] relative_install_dir = "module/resourceschedule" part_name = "${device_usage_statistics_part_name}" diff --git a/bundle.json b/bundle.json index 0b6e8d3..56c99b8 100644 --- a/bundle.json +++ b/bundle.json @@ -34,16 +34,13 @@ "ability_runtime", "hicollie", "hilog", - "hitrace", "samgr", - "cJSON", "c_utils", "napi", "ability_base", "background_task_mgr", "eventhandler", "power_manager", - "selinux_adapter", "time_service", "init", "jsoncpp", diff --git a/interfaces/test/unittest/device_usage_statistics_jsunittest/BUILD.gn b/interfaces/test/unittest/device_usage_statistics_jsunittest/BUILD.gn index 2bbb48c..c505e9a 100644 --- a/interfaces/test/unittest/device_usage_statistics_jsunittest/BUILD.gn +++ b/interfaces/test/unittest/device_usage_statistics_jsunittest/BUILD.gn @@ -12,8 +12,7 @@ # limitations under the License. import("//build/test.gni") -module_output_path = - "device_usage_statistics/device_usage_statistics/interfaces" +module_output_path = "device_usage_statistics/interfaces" ohos_js_unittest("DeviceUsageStatisticsJsTest") { module_out_path = module_output_path diff --git a/services/common/include/bundle_active_usage_database.h b/services/common/include/bundle_active_usage_database.h index 41123f4..891cf78 100644 --- a/services/common/include/bundle_active_usage_database.h +++ b/services/common/include/bundle_active_usage_database.h @@ -140,11 +140,11 @@ private: void SupportAppTwin(); void AddRdbColumn(const std::shared_ptr store, const std::string& tableName, const std::string& columnName, const std::string& columnType); + void CheckDatabaseFileAndTable(); std::vector databaseFiles_; std::vector> sortedTableArray_; std::map> bundleActiveRdbStoreCache_; std::shared_ptr calendar_; - void CheckDatabaseFileAndTable(); std::string eventTableName_; std::string durationTableName_; std::string bundleHistoryTableName_; diff --git a/services/common/src/bundle_active_app_state_obsever.cpp b/services/common/src/bundle_active_app_state_obsever.cpp index 872a075..caba8de 100644 --- a/services/common/src/bundle_active_app_state_obsever.cpp +++ b/services/common/src/bundle_active_app_state_obsever.cpp @@ -53,15 +53,9 @@ void BundleActiveAppStateObserver::OnAbilityStateChanged(const AbilityStateData tmpHandlerObject.event_.timeStamp_ = timer->GetBootTimeMs(); switch (abilityStateData.abilityState) { case static_cast(AppExecFwk::AbilityState::ABILITY_STATE_FOREGROUND): - if (!abilityStateData.isFocused) { - return; - } tmpHandlerObject.event_.eventId_ = BundleActiveEvent::ABILITY_FOREGROUND; break; case static_cast(AppExecFwk::AbilityState::ABILITY_STATE_BACKGROUND): - if (abilityStateData.isFocused) { - return; - } tmpHandlerObject.event_.eventId_ = BundleActiveEvent::ABILITY_BACKGROUND; break; case static_cast(AppExecFwk::AbilityState::ABILITY_STATE_TERMINATED): diff --git a/services/common/src/bundle_active_stub.cpp b/services/common/src/bundle_active_stub.cpp deleted file mode 100644 index d06a935..0000000 --- a/services/common/src/bundle_active_stub.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) 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. - */ - -#include "bundle_active_stub.h" - -#include "ipc_object_stub.h" -#include "iremote_broker.h" - -#include "bundle_active_event.h" -#include "bundle_active_event_stats.h" -#include "bundle_state_inner_errors.h" -#include "bundle_active_log.h" -#include "bundle_active_module_record.h" -#include "bundle_active_package_stats.h" -#include "iapp_group_callback.h" -#include "ibundle_active_service_ipc_interface_code.h" - -namespace OHOS { -namespace DeviceUsageStats { -namespace { - constexpr int32_t EVENT_MAX_SIZE = 100000; - constexpr int32_t PACKAGE_MAX_SIZE = 1000; -} - -int32_t BundleActiveStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel &reply, - MessageOption &option) -{ - if (data.ReadInterfaceToken() != GetDescriptor()) { - return -1; - } - switch (code) { - case static_cast(IBundleActiveServiceInterfaceCode::REPORT_EVENT): - return HandleReportEvent(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::IS_BUNDLE_IDLE): - return HandleIsBundleIdle(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_BUNDLE_STATS_INFO_BY_INTERVAL): - return HandleQueryBundleStatsInfoByInterval(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_BUNDLE_EVENTS): - return HandleQueryBundleEvents(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::SET_APP_GROUP): - return HandleSetAppGroup(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_BUNDLE_STATS_INFOS): - return HandleQueryBundleStatsInfos(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_CURRENT_BUNDLE_EVENTS): - return HandleQueryCurrentBundleEvents(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_APP_GROUP): - return HandleQueryAppGroup(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_MODULE_USAGE_RECORDS): - return HandleQueryModuleUsageRecords(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::REGISTER_APP_GROUP_CALLBACK): - return HandleRegisterAppGroupCallBack(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::UNREGISTER_APP_GROUP_CALLBACK): - return HandleUnRegisterAppGroupCallBack(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_DEVICE_EVENT_STATES): - return HandleQueryDeviceEventStats(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::QUERY_NOTIFICATION_NUMBER): - return HandleQueryNotificationEventStats(data, reply); - case static_cast(IBundleActiveServiceInterfaceCode::IS_BUNDLE_USE_PERIOD): - return HandleIsBundleUsePeriod(data, reply); - default: - return IPCObjectStub::OnRemoteRequest(code, data, reply, option); - } - return ERR_OK; -} - -ErrCode BundleActiveStub::HandleReportEvent(MessageParcel& data, MessageParcel& reply) -{ - int32_t userId = data.ReadInt32(); - std::shared_ptr tmpEvent = BundleActiveEvent::UnMarshalling(data); - if (!tmpEvent) { - return -1; - } - int32_t result = ReportEvent(*tmpEvent, userId); - return reply.WriteInt32(result); -} - -ErrCode BundleActiveStub::HandleIsBundleIdle(MessageParcel& data, MessageParcel& reply) -{ - bool isBundleIdle = false; - std::string bundleName = data.ReadString(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = IsBundleIdle(isBundleIdle, bundleName, userId); - reply.WriteInt32(isBundleIdle); - return reply.WriteInt32(errCode); -} - -ErrCode BundleActiveStub::HandleIsBundleUsePeriod(MessageParcel& data, MessageParcel& reply) -{ - bool IsUsePeriod = false; - std::string bundleName = data.ReadString(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = IsBundleUsePeriod(IsUsePeriod, bundleName, userId); - reply.WriteInt32(IsUsePeriod); - return reply.WriteInt32(errCode); -} - -ErrCode BundleActiveStub::HandleQueryBundleStatsInfoByInterval(MessageParcel& data, MessageParcel& reply) -{ - std::vector result; - int32_t intervalType = data.ReadInt32(); - BUNDLE_ACTIVE_LOGI("OnRemoteRequest intervaltype is %{public}d", intervalType); - int64_t beginTime = data.ReadInt64(); - int64_t endTime = data.ReadInt64(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = QueryBundleStatsInfoByInterval(result, intervalType, beginTime, endTime, userId); - int32_t size = static_cast(result.size()); - if (size > PACKAGE_MAX_SIZE) { - errCode = ERR_QUERY_RESULT_TOO_LARGE; - reply.WriteInt32(errCode); - return -1; - } - BUNDLE_ACTIVE_LOGI("OnRemoteRequest result size is %{public}d", size); - reply.WriteInt32(errCode); - reply.WriteInt32(size); - for (int32_t i = 0; i < size; i++) { - bool tmp = result[i].Marshalling(reply); - if (tmp == false) { - return 1; - } - } - return size == 0; -} - -ErrCode BundleActiveStub::HandleQueryBundleEvents(MessageParcel& data, MessageParcel& reply) -{ - std::vector result; - int64_t beginTime = data.ReadInt64(); - int64_t endTime = data.ReadInt64(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = QueryBundleEvents(result, beginTime, endTime, userId); - int32_t size = static_cast(result.size()); - if (size > EVENT_MAX_SIZE) { - errCode = ERR_QUERY_RESULT_TOO_LARGE; - reply.WriteInt32(errCode); - return -1; - } - reply.WriteInt32(errCode); - reply.WriteInt32(size); - for (int32_t i = 0; i < size; i++) { - bool tmp = result[i].Marshalling(reply); - if (tmp == false) { - return 1; - } - } - return size == 0; -} - -ErrCode BundleActiveStub::HandleQueryBundleStatsInfos(MessageParcel& data, MessageParcel& reply) -{ - std::vector result; - int32_t intervalType = data.ReadInt32(); - BUNDLE_ACTIVE_LOGI("OnRemoteRequest QUERY_BUNDLE_STATS_INFOS intervaltype is %{public}d", intervalType); - int64_t beginTime = data.ReadInt64(); - int64_t endTime = data.ReadInt64(); - ErrCode errCode = QueryBundleStatsInfos(result, intervalType, beginTime, endTime); - int32_t size = static_cast(result.size()); - if (size > PACKAGE_MAX_SIZE) { - errCode = ERR_QUERY_RESULT_TOO_LARGE; - reply.WriteInt32(errCode); - return -1; - } - BUNDLE_ACTIVE_LOGI("OnRemoteRequest QUERY_BUNDLE_STATS_INFOS result size is %{public}d", size); - reply.WriteInt32(errCode); - reply.WriteInt32(size); - for (int32_t i = 0; i < size; i++) { - bool tmp = result[i].Marshalling(reply); - if (tmp == false) { - return 1; - } - } - return size == 0; -} -ErrCode BundleActiveStub::HandleSetAppGroup(MessageParcel &data, MessageParcel &reply) -{ - std::string bundleName = data.ReadString(); - int32_t newGroup = data.ReadInt32(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = SetAppGroup(bundleName, newGroup, userId); - return reply.WriteInt32(errCode); -} - -ErrCode BundleActiveStub::HandleQueryCurrentBundleEvents(MessageParcel &data, MessageParcel &reply) -{ - std::vector result; - int64_t beginTime = data.ReadInt64(); - int64_t endTime = data.ReadInt64(); - ErrCode errCode = QueryCurrentBundleEvents(result, beginTime, endTime); - int32_t size = static_cast(result.size()); - if (size > EVENT_MAX_SIZE) { - errCode = ERR_QUERY_RESULT_TOO_LARGE; - reply.WriteInt32(errCode); - return -1; - } - reply.WriteInt32(errCode); - reply.WriteInt32(size); - for (int32_t i = 0; i < size; i++) { - bool tmp = result[i].Marshalling(reply); - if (tmp == false) { - return 1; - } - } - return size == 0; -} - -ErrCode BundleActiveStub::HandleQueryModuleUsageRecords(MessageParcel &data, MessageParcel &reply) -{ - std::vector results; - int32_t maxNum = data.ReadInt32(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = QueryModuleUsageRecords(maxNum, results, userId); - int32_t size = static_cast(results.size()); - if (size > PACKAGE_MAX_SIZE) { - errCode = ERR_QUERY_RESULT_TOO_LARGE; - reply.WriteInt32(errCode); - return -1; - } - reply.WriteInt32(errCode); - reply.WriteInt32(size); - for (int32_t i = 0; i < size; i++) { - bool tmp = results[i].Marshalling(reply); - if (tmp == false) { - return 1; - } - } - return size == 0; -} - -ErrCode BundleActiveStub::HandleQueryAppGroup(MessageParcel& data, MessageParcel& reply) -{ - int32_t appGroup = -1; - std::string bundleName = data.ReadString(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = QueryAppGroup(appGroup, bundleName, userId); - reply.WriteInt32(appGroup); - return reply.WriteInt32(errCode); -} - -ErrCode BundleActiveStub::HandleRegisterAppGroupCallBack(MessageParcel& data, MessageParcel& reply) -{ - auto observer = iface_cast(data.ReadRemoteObject()); - if (!observer) { - BUNDLE_ACTIVE_LOGE("RegisterAppGroupCallBack observer is null, return"); - return false; - } - BUNDLE_ACTIVE_LOGI("RegisterAppGroupCallBack observer is ok"); - ErrCode errCode = RegisterAppGroupCallBack(observer); - return reply.WriteInt32(errCode); -} - -ErrCode BundleActiveStub::HandleUnRegisterAppGroupCallBack(MessageParcel& data, MessageParcel& reply) -{ - auto observer = iface_cast(data.ReadRemoteObject()); - if (!observer) { - BUNDLE_ACTIVE_LOGE("UnRegisterAppGroupCallBack observer is null, return"); - return false; - } - ErrCode errCode = UnRegisterAppGroupCallBack(observer); - return reply.WriteInt32(errCode); -} - -ErrCode BundleActiveStub::HandleQueryDeviceEventStats(MessageParcel& data, MessageParcel& reply) -{ - std::vector result; - int64_t beginTime = data.ReadInt64(); - int64_t endTime = data.ReadInt64(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = QueryDeviceEventStats(beginTime, endTime, result, userId); - int32_t size = static_cast(result.size()); - if (size > EVENT_MAX_SIZE) { - errCode = ERR_QUERY_RESULT_TOO_LARGE; - reply.WriteInt32(errCode); - return -1; - } - reply.WriteInt32(errCode); - reply.WriteInt32(size); - for (int32_t i = 0; i < size; i++) { - bool tmp = result[i].Marshalling(reply); - if (!tmp) { - return 1; - } - } - return size == 0; -} - -ErrCode BundleActiveStub::HandleQueryNotificationEventStats(MessageParcel& data, MessageParcel& reply) -{ - std::vector result; - int64_t beginTime = data.ReadInt64(); - int64_t endTime = data.ReadInt64(); - int32_t userId = data.ReadInt32(); - ErrCode errCode = QueryNotificationEventStats(beginTime, endTime, result, userId); - int32_t size = static_cast(result.size()); - if (size > PACKAGE_MAX_SIZE) { - errCode = ERR_QUERY_RESULT_TOO_LARGE; - reply.WriteInt32(errCode); - return -1; - } - reply.WriteInt32(errCode); - reply.WriteInt32(size); - for (int32_t i = 0; i < size; i++) { - bool tmp = result[i].Marshalling(reply); - if (!tmp) { - return 1; - } - } - return size == 0; -} -} // namespace DeviceUsageStats -} // namespace OHOS - diff --git a/services/common/src/bundle_active_usage_database.cpp b/services/common/src/bundle_active_usage_database.cpp index 8e4e74d..3da0d5e 100644 --- a/services/common/src/bundle_active_usage_database.cpp +++ b/services/common/src/bundle_active_usage_database.cpp @@ -1084,7 +1084,6 @@ void BundleActiveUsageDatabase::FlushEventInfo(uint32_t databaseType, BundleActi CreateEventLogTable(databaseType, stats.beginTime_); } int64_t eventTableTime = ParseStartTime(eventTableName_); - int64_t outRowId = BUNDLE_ACTIVE_FAIL; std::vector valuesBuckets; for (uint32_t i = 0; i < stats.events_.Size(); i++) { NativeRdb::ValuesBucket valuesBucket; diff --git a/services/packagegroup/src/bundle_active_group_controller.cpp b/services/packagegroup/src/bundle_active_group_controller.cpp index 0c36e11..367e8c0 100644 --- a/services/packagegroup/src/bundle_active_group_controller.cpp +++ b/services/packagegroup/src/bundle_active_group_controller.cpp @@ -26,6 +26,7 @@ namespace OHOS { namespace DeviceUsageStats { using namespace DeviceUsageStatsGroupConst; const int32_t MAIN_APP_INDEX = 0; + const int32_t MSG_KEY_HIGH_BIT = 32; BundleActiveGroupHandlerObject::BundleActiveGroupHandlerObject() { bundleName_ = ""; @@ -79,7 +80,6 @@ void BundleActiveGroupController::OnUserSwitched(const int32_t userId, const int CheckEachBundleState(currentUsedUser); bundleUserHistory_->WriteBundleUsage(currentUsedUser); std::lock_guard lock(mutex_); - auto activeGroupHandler = activeGroupHandler_.lock(); if (!activeGroupHandler_.expired()) { activeGroupHandler_.lock()->RemoveEvent(BundleActiveGroupHandler::MSG_CHECK_IDLE_STATE); activeGroupHandler_.lock()->RemoveEvent(BundleActiveGroupHandler::MSG_CHECK_DEFAULT_BUNDLE_STATE); diff --git a/test/fuzztest/appgroupcallbackstub_fuzzer/BUILD.gn b/test/fuzztest/appgroupcallbackstub_fuzzer/BUILD.gn index fff8c6b..adb9a94 100644 --- a/test/fuzztest/appgroupcallbackstub_fuzzer/BUILD.gn +++ b/test/fuzztest/appgroupcallbackstub_fuzzer/BUILD.gn @@ -60,7 +60,6 @@ ohos_fuzztest("AppgroupcallbackstubFuzzTest") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", - "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", @@ -71,7 +70,6 @@ ohos_fuzztest("AppgroupcallbackstubFuzzTest") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", - "selinux_adapter:librestorecon", "time_service:time_client", ] diff --git a/test/fuzztest/bundleactiveobserver_fuzzer/BUILD.gn b/test/fuzztest/bundleactiveobserver_fuzzer/BUILD.gn index 06693f2..e9aaf04 100644 --- a/test/fuzztest/bundleactiveobserver_fuzzer/BUILD.gn +++ b/test/fuzztest/bundleactiveobserver_fuzzer/BUILD.gn @@ -65,7 +65,6 @@ ohos_fuzztest("BundleActiveObserverFuzzTest") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", - "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", @@ -76,7 +75,6 @@ ohos_fuzztest("BundleActiveObserverFuzzTest") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", - "selinux_adapter:librestorecon", "time_service:time_client", ] diff --git a/test/fuzztest/bundleactiveonremoterequest_fuzzer/BUILD.gn b/test/fuzztest/bundleactiveonremoterequest_fuzzer/BUILD.gn index 1c05cfc..1b0050b 100644 --- a/test/fuzztest/bundleactiveonremoterequest_fuzzer/BUILD.gn +++ b/test/fuzztest/bundleactiveonremoterequest_fuzzer/BUILD.gn @@ -59,7 +59,6 @@ ohos_fuzztest("BundleActiveOnRemoteRequestFuzzTest") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", - "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", @@ -70,7 +69,6 @@ ohos_fuzztest("BundleActiveOnRemoteRequestFuzzTest") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", - "selinux_adapter:librestorecon", "time_service:time_client", ] diff --git a/test/fuzztest/bundleactivepowerstatecallbackproxy_fuzzer/BUILD.gn b/test/fuzztest/bundleactivepowerstatecallbackproxy_fuzzer/BUILD.gn index 5ec4293..071d756 100644 --- a/test/fuzztest/bundleactivepowerstatecallbackproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/bundleactivepowerstatecallbackproxy_fuzzer/BUILD.gn @@ -64,7 +64,6 @@ ohos_fuzztest("BundleActivePowerstateCallbackproxyFuzzTest") { "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", - "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", @@ -75,7 +74,6 @@ ohos_fuzztest("BundleActivePowerstateCallbackproxyFuzzTest") { "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", - "selinux_adapter:librestorecon", "time_service:time_client", ] diff --git a/test/unittest/bundle_active_total_test.cpp b/test/unittest/bundle_active_total_test.cpp index 3f8c01e..a1fadbf 100644 --- a/test/unittest/bundle_active_total_test.cpp +++ b/test/unittest/bundle_active_total_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 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 @@ -18,10 +18,10 @@ #include #include "system_ability_definition.h" -#include "bundle_active_power_state_callback_service.h" #include "bundle_active_power_state_callback_service.h" #include "bundle_active_service_stub.h" #include "bundle_active_core.h" + #include "bundle_active_continuous_task_observer.h" #include "bundle_active_bundle_mgr_helper.h" #include "bundle_active_app_state_observer.h" -- Gitee