diff --git a/bundle.json b/bundle.json index 93f26cb0fbdb68732bb54bb82cc92b74885c63fd..35ac7d426bfbd839bbf2b79725becb9e8143e5d0 100644 --- a/bundle.json +++ b/bundle.json @@ -53,13 +53,12 @@ ], "deps": { "components": [ - "distributeddatamgr", "ace_engine", "samgr", - "hitrace_native", + "hitrace", "napi", "window_manager", - "hiviewdfx_hilog_native", + "hilog", "relational_store", "device_usage_statistics", "bundle_framework", @@ -69,18 +68,18 @@ "ability_base", "common_event_service", "os_account", + "hisysevent", "hicollie", - "hisysevent_native", "access_token", "ipc", "player_framework", "multimedia_image_framework", "eventhandler", - "utils_base", "c_utils", "i18n", "device_manager", - "kv_store" + "kv_store", + "ffrt" ], "third_party": [ "libuv" diff --git a/frameworks/ans/BUILD.gn b/frameworks/ans/BUILD.gn index 83c528687738e4069ebee49c4a31e9f726c981fc..c553c48b2ff39dbf5fc38b3242022182e0380c98 100644 --- a/frameworks/ans/BUILD.gn +++ b/frameworks/ans/BUILD.gn @@ -64,6 +64,7 @@ ohos_shared_library("ans_innerkits") { "src/notification_subscriber.cpp", "src/notification_template.cpp", "src/notification_user_input.cpp", + "src/push_callback_stub.cpp", ] configs = [ "${core_path}:public_ans_core_config" ] @@ -77,8 +78,8 @@ ohos_shared_library("ans_innerkits") { "ability_base:zuri", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hitrace_native:hitrace_meter", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", "ipc:ipc_core", "multimedia_image_framework:image_native", "relational_store:native_rdb", diff --git a/services/ans/src/push_callback_stub.cpp b/frameworks/ans/src/push_callback_stub.cpp similarity index 88% rename from services/ans/src/push_callback_stub.cpp rename to frameworks/ans/src/push_callback_stub.cpp index 04a14b6de2b83a0062d2bc6887dc4009b9ee3963..beb84e2d185906af5c11506f6649068a12f96a6b 100644 --- a/services/ans/src/push_callback_stub.cpp +++ b/frameworks/ans/src/push_callback_stub.cpp @@ -15,7 +15,6 @@ #include "push_callback_stub.h" -#include "advanced_notification_service.h" #include "ans_log_wrapper.h" #include "ipc_types.h" #include "message_parcel.h" @@ -83,15 +82,5 @@ bool PushCallBackProxy::OnCheckNotification(const std::string ¬ificationData) return reply.ReadBool(); } - -void PushCallbackRecipient::OnRemoteDied(const wptr &remote) -{ - ANS_LOGE("Push Callback died, remove the proxy object"); - AdvancedNotificationService::GetInstance()->ResetPushCallbackProxy(); -} - -PushCallbackRecipient::PushCallbackRecipient() {} - -PushCallbackRecipient::~PushCallbackRecipient() {} } // namespace Notification } // namespace OHOS diff --git a/frameworks/ans/test/unittest/BUILD.gn b/frameworks/ans/test/unittest/BUILD.gn index ac8f75299e61cf1b1d1c79a3015410026b42319a..357471218596353eb9938b813f5f769e74f602e0 100644 --- a/frameworks/ans/test/unittest/BUILD.gn +++ b/frameworks/ans/test/unittest/BUILD.gn @@ -77,8 +77,8 @@ ohos_unittest("ans_reminder_unit_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", diff --git a/frameworks/core/BUILD.gn b/frameworks/core/BUILD.gn index 2e5fb564dde3da96dc55dfba8c0e15d54d5c631a..823ea9c4516ea2fa14c6a8a7322ab00f6d7f33ab 100644 --- a/frameworks/core/BUILD.gn +++ b/frameworks/core/BUILD.gn @@ -81,8 +81,8 @@ ohos_shared_library("ans_core") { "c_utils:utils", "eventhandler:libeventhandler", "hicollie:libhicollie", - "hitrace_native:hitrace_meter", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", "i18n:intl_util", "ipc:ipc_core", "multimedia_image_framework:image_native", diff --git a/frameworks/core/test/unittest/ans_image_util_test/BUILD.gn b/frameworks/core/test/unittest/ans_image_util_test/BUILD.gn index d7d044d415936ece0a0c7dd8b9c8f63ce374a71d..89534ec4bddeaaa3d23d3e8d61b7b09ad8a4e940 100644 --- a/frameworks/core/test/unittest/ans_image_util_test/BUILD.gn +++ b/frameworks/core/test/unittest/ans_image_util_test/BUILD.gn @@ -44,7 +44,7 @@ ohos_unittest("ans_image_util_test") { "ability_base:zuri", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/frameworks/core/test/unittest/ans_manager_stub_test/BUILD.gn b/frameworks/core/test/unittest/ans_manager_stub_test/BUILD.gn index 263e56b33b63f4ff4f4358f39d2ffe735f8bb89a..ee8c99f3d9834c1a766a8de299ee9743294122fa 100644 --- a/frameworks/core/test/unittest/ans_manager_stub_test/BUILD.gn +++ b/frameworks/core/test/unittest/ans_manager_stub_test/BUILD.gn @@ -30,7 +30,7 @@ ohos_unittest("ans_manager_stub_test") { "ability_base:zuri", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/frameworks/core/test/unittest/ans_notification_test/BUILD.gn b/frameworks/core/test/unittest/ans_notification_test/BUILD.gn index 189b3a8c8a829dae02d066e9dc6d975e7e3e7495..edb5dd9dde4b573ca6109fbdee567d4dc927225d 100644 --- a/frameworks/core/test/unittest/ans_notification_test/BUILD.gn +++ b/frameworks/core/test/unittest/ans_notification_test/BUILD.gn @@ -40,7 +40,7 @@ ohos_unittest("ans_notification_test") { "ability_base:zuri", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/frameworks/js/napi/BUILD.gn b/frameworks/js/napi/BUILD.gn index 49766d96a29e547e516a8312b1c6dacec26dcf5d..635ff71a2111a514c7306d5d8093c88dbeadb52f 100644 --- a/frameworks/js/napi/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -82,7 +82,7 @@ ohos_shared_library("notification") { "ability_runtime:napi_common", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image", "napi:ace_napi", "relational_store:native_rdb", diff --git a/frameworks/js/napi/src/manager/BUILD.gn b/frameworks/js/napi/src/manager/BUILD.gn index 9ec1cb5e6244421ff707eb68c8f72f669dafa794..35a6a47dd3138dc35979895fb22fc53b297226c1 100644 --- a/frameworks/js/napi/src/manager/BUILD.gn +++ b/frameworks/js/napi/src/manager/BUILD.gn @@ -67,7 +67,6 @@ ohos_shared_library("notificationmanager") { deps = [ "${core_path}:ans_core", "${frameworks_module_ans_path}:ans_innerkits", - "${services_path}/ans:libans", ] external_deps = [ @@ -81,7 +80,7 @@ ohos_shared_library("notificationmanager") { "ability_runtime:wantagent_innerkits", "access_token:libtokenid_sdk", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image", "napi:ace_napi", "relational_store:native_rdb", diff --git a/frameworks/js/napi/src/reminder/BUILD.gn b/frameworks/js/napi/src/reminder/BUILD.gn index 69216987ba0f6deb95f031e4e489bfb968477212..48a7617bd633c747e317d2de3c245a7d848f66bc 100644 --- a/frameworks/js/napi/src/reminder/BUILD.gn +++ b/frameworks/js/napi/src/reminder/BUILD.gn @@ -54,7 +54,7 @@ ohos_shared_library("reminderagent") { "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image", "napi:ace_napi", "relational_store:native_rdb", @@ -96,7 +96,7 @@ ohos_shared_library("reminderagentmanager") { "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image", "napi:ace_napi", "relational_store:native_rdb", diff --git a/frameworks/js/napi/src/subscribe/BUILD.gn b/frameworks/js/napi/src/subscribe/BUILD.gn index 40ab1f9eccbab83a20499b834c4be3677496b73a..b5850404cc2327af1845425a77f2ad64ed2c0e1c 100644 --- a/frameworks/js/napi/src/subscribe/BUILD.gn +++ b/frameworks/js/napi/src/subscribe/BUILD.gn @@ -58,7 +58,7 @@ ohos_shared_library("notificationsubscribe") { "ability_runtime:napi_common", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image", "napi:ace_napi", "relational_store:native_rdb", diff --git a/frameworks/test/moduletest/BUILD.gn b/frameworks/test/moduletest/BUILD.gn index 79e1e6ec78074e0fdb85ef82dfd0209ae9ddfdb6..88482e57ebafaf258c3b42a66114c9bd153d2774 100644 --- a/frameworks/test/moduletest/BUILD.gn +++ b/frameworks/test/moduletest/BUILD.gn @@ -40,6 +40,7 @@ ohos_moduletest("ans_fw_module_test") { "${core_path}/include", "${inner_api_path}", "${frameworks_path}/test/moduletest/mock/include", + "${ffrt_path}/interfaces/kits", ] sources = [ @@ -80,6 +81,7 @@ ohos_moduletest("ans_fw_module_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "ffrt:libffrt", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -108,6 +110,7 @@ ohos_moduletest("ans_innerkits_module_publish_test") { "${core_path}/include", "${inner_api_path}", "${frameworks_path}/test/moduletest/mock/include", + "${ffrt_path}/interfaces/kits", ] sources = [ @@ -146,6 +149,7 @@ ohos_moduletest("ans_innerkits_module_publish_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "ffrt:libffrt", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -174,6 +178,7 @@ ohos_moduletest("ans_innerkits_module_slot_test") { "${core_path}/include", "${inner_api_path}", "${frameworks_path}/test/moduletest/mock/include", + "${ffrt_path}/interfaces/kits", ] sources = [ @@ -210,6 +215,7 @@ ohos_moduletest("ans_innerkits_module_slot_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "ffrt:libffrt", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -238,6 +244,7 @@ ohos_moduletest("ans_innerkits_module_setting_test") { "${core_path}/include", "${inner_api_path}", "${frameworks_path}/test/moduletest/mock/include", + "${ffrt_path}/interfaces/kits", ] sources = [ @@ -274,6 +281,7 @@ ohos_moduletest("ans_innerkits_module_setting_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "ffrt:libffrt", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", diff --git a/services/ans/include/push_callback_proxy.h b/interfaces/inner_api/push_callback_proxy.h similarity index 80% rename from services/ans/include/push_callback_proxy.h rename to interfaces/inner_api/push_callback_proxy.h index 469f00b0dac5ed94b4e03f1f70b2ae9cf0ef51d2..1d9dce762c3b7f437046cd416d29540e49dedfa7 100644 --- a/services/ans/include/push_callback_proxy.h +++ b/interfaces/inner_api/push_callback_proxy.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_PUSH_CALLBACK_PROXY_H -#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_PUSH_CALLBACK_PROXY_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_PUSH_CALLBACK_PROXY_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_PUSH_CALLBACK_PROXY_H #include "push_callback_interface.h" #include "iremote_proxy.h" @@ -46,4 +46,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_PUSH_CALLBACK_PROXY_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_PUSH_CALLBACK_PROXY_H diff --git a/interfaces/inner_api/push_callback_stub.h b/interfaces/inner_api/push_callback_stub.h index 18bf248692cc1363bd8882f54159fc83efa8c62b..25ea84c269af48708ef1591ed8dd5b4c8e25b2c0 100644 --- a/interfaces/inner_api/push_callback_stub.h +++ b/interfaces/inner_api/push_callback_stub.h @@ -40,17 +40,6 @@ public: private: DISALLOW_COPY_AND_MOVE(PushCallBackStub); }; - -/** - * @class PushCallbackRecipient - * PushCallbackRecipient notices IRemoteBroker died. - */ -class PushCallbackRecipient : public IRemoteObject::DeathRecipient { -public: - explicit PushCallbackRecipient(); - virtual ~PushCallbackRecipient(); - virtual void OnRemoteDied(const wptr &remote); -}; } // namespace Notification } // namespace OHOS #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_PUSH_CALLBACK_STUB_H diff --git a/notification.gni b/notification.gni index 3d60e89d55afd5dd1951ef06634fb23a0c14d47d..ebf06efc4e3576a725e2e952570e1d48e979a299 100644 --- a/notification.gni +++ b/notification.gni @@ -12,6 +12,7 @@ # limitations under the License. ability_runtime_path = "//foundation/ability/ability_runtime" +ffrt_path = "//foundation/resourceschedule/ffrt" ability_runtime_inner_api_path = "${ability_runtime_path}/interfaces/inner_api" ability_runtime_services_path = "${ability_runtime_path}/services" ability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits" @@ -39,7 +40,7 @@ component_external_deps = [ "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index 8df7d8bd74a9f57f1a5c0f529e90b8352900b47b..914f22f54752b9dd5b5d7e6aab1a6be63545473d 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -28,7 +28,10 @@ config("public_ans_config") { ohos_shared_library("libans") { shlib_type = "sa" version_script = "libans.map" - include_dirs = [ "include" ] + include_dirs = [ + "include", + "${ffrt_path}/interfaces/kits", + ] sources = [ "src/access_token_helper.cpp", @@ -44,7 +47,6 @@ ohos_shared_library("libans") { "src/notification_slot_filter.cpp", "src/notification_subscriber_manager.cpp", "src/permission_filter.cpp", - "src/push_callback_stub.cpp", "src/reminder_data_manager.cpp", "src/reminder_event_manager.cpp", "src/reminder_timer_info.cpp", @@ -56,7 +58,11 @@ ohos_shared_library("libans") { defines = [] cflags = [] - deps = [ "${core_path}:ans_core" ] + deps = [ + "${arkui_ace_engine_path}/interfaces/inner_api/ui_service_manager:ui_service_mgr", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", + ] if (is_double_framework) { cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ] @@ -75,7 +81,8 @@ ohos_shared_library("libans") { "access_token:libtokenid_sdk", "c_utils:utils", "device_manager:devicemanagersdk", - "hitrace_native:hitrace_meter", + "ffrt:libffrt", + "hitrace:hitrace_meter", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", "os_account:os_account_innerkits", @@ -93,7 +100,7 @@ ohos_shared_library("libans") { if (hisysevent_usage) { cflags += [ "-DHAS_HISYSEVENT_PART" ] - external_deps += [ "hisysevent_native:libhisysevent" ] + external_deps += [ "hisysevent:libhisysevent" ] } innerapi_tags = [ "platformsdk" ] subsystem_name = "${subsystem_name}" diff --git a/services/ans/include/advanced_notification_service.h b/services/ans/include/advanced_notification_service.h index be7b9c47d977a006c9454911e194ae47fa72704a..b5293676c58465ada310736ca0b1babfe8dde2d0 100644 --- a/services/ans/include/advanced_notification_service.h +++ b/services/ans/include/advanced_notification_service.h @@ -23,6 +23,7 @@ #include "event_handler.h" #include "event_runner.h" +#include "ffrt.h" #include "refbase.h" #include "ans_const_define.h" @@ -840,12 +841,24 @@ private: std::shared_ptr distributedKvStoreDeathRecipient_ = nullptr; std::shared_ptr systemEventObserver_ = nullptr; DistributedKv::DistributedKvDataManager dataManager_; - sptr pushRecipient_ = nullptr;; + sptr pushRecipient_ = nullptr; + std::shared_ptr notificationSvrQueue_ = nullptr; #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED NotificationConstant::DistributedReminderPolicy distributedReminderPolicy_ = DEFAULT_DISTRIBUTED_REMINDER_POLICY; bool localScreenOn_ = true; #endif }; + +/** + * @class PushCallbackRecipient + * PushCallbackRecipient notices IRemoteBroker died. + */ +class PushCallbackRecipient : public IRemoteObject::DeathRecipient { +public: + explicit PushCallbackRecipient(); + virtual ~PushCallbackRecipient(); + virtual void OnRemoteDied(const wptr &remote); +}; } // namespace Notification } // namespace OHOS diff --git a/services/ans/include/notification_subscriber_manager.h b/services/ans/include/notification_subscriber_manager.h index 83a4ea4595a641bad9bbc702338fe3824bcf97e7..53bae6aa4b2dabbbb3c8b9f54b69938c29f63e9b 100644 --- a/services/ans/include/notification_subscriber_manager.h +++ b/services/ans/include/notification_subscriber_manager.h @@ -23,6 +23,7 @@ #include "errors.h" #include "event_handler.h" #include "event_runner.h" +#include "ffrt.h" #include "nocopyable.h" #include "refbase.h" #include "singleton.h" @@ -138,6 +139,7 @@ private: std::shared_ptr handler_ {}; sptr ansSubscriberProxy_ {}; sptr recipient_ {}; + std::shared_ptr notificationSubQueue_ = nullptr; DECLARE_DELAYED_SINGLETON(NotificationSubscriberManager); DISALLOW_COPY_AND_MOVE(NotificationSubscriberManager); diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index 903d668e6bc66cd5382c3ab29c3abf63545688a4..d52a704547a1744ed9ac8e53c93b3747bbef34f8 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -48,7 +48,7 @@ #include "notification_subscriber_manager.h" #include "os_account_manager.h" #include "permission_filter.h" -#include "push_callback_stub.h" +#include "push_callback_proxy.h" #include "reminder_data_manager.h" #include "trigger_info.h" #include "want_agent_helper.h" @@ -278,9 +278,10 @@ sptr AdvancedNotificationService::GetInstance() AdvancedNotificationService::AdvancedNotificationService() { - runner_ = OHOS::AppExecFwk::EventRunner::Create("NotificationSvrMain"); - handler_ = std::make_shared(runner_); - AnsWatchdog::AddHandlerThread(handler_, runner_); + notificationSvrQueue_ = std::make_shared("NotificationSvrMain"); + if (!notificationSvrQueue_) { + ANS_LOGE("ffrt create failed!"); + } recentInfo_ = std::make_shared(); distributedKvStoreDeathRecipient_ = std::make_shared( std::bind(&AdvancedNotificationService::OnDistributedKvStoreDeathRecipient, this)); @@ -392,7 +393,10 @@ ErrCode AdvancedNotificationService::CancelPreparedNotification( return ERR_ANS_INVALID_BUNDLE; } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr notification = nullptr; result = RemoveFromNotificationList(bundleOption, label, notificationId, notification, true); if (result != ERR_OK) { @@ -409,7 +413,9 @@ ErrCode AdvancedNotificationService::CancelPreparedNotification( #endif } })); - + ANS_LOGE("ffrt wait!"); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); SendCancelHiSysEvent(notificationId, label, bundleOption, result); return result; } @@ -460,7 +466,9 @@ ErrCode AdvancedNotificationService::PublishPreparedNotification( SetNotificationRemindType(record->notification, true); ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = AssignValidNotificationSlot(record); if (result != ERR_OK) { ANS_LOGE("Can not assign valid slot!"); @@ -487,7 +495,8 @@ ErrCode AdvancedNotificationService::PublishPreparedNotification( } #endif })); - + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); if (record->request->GetAutoDeletedTime() > GetCurrentTime()) { StartAutoDelete(record); } @@ -674,7 +683,9 @@ ErrCode AdvancedNotificationService::CancelAll() ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr notification = nullptr; std::vector keys = GetNotificationKeys(bundleOption); @@ -703,6 +714,8 @@ ErrCode AdvancedNotificationService::CancelAll() result = ERR_OK; })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -757,7 +770,9 @@ ErrCode AdvancedNotificationService::AddSlots(const std::vectorPostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); std::vector> addSlots; for (auto slot : slots) { sptr originalSlot; @@ -776,6 +791,8 @@ ErrCode AdvancedNotificationService::AddSlots(const std::vectorwait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -789,13 +806,17 @@ ErrCode AdvancedNotificationService::GetSlots(std::vector } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().GetNotificationAllSlots(bundleOption, slots); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_BUNDLE_NOT_EXIST) { result = ERR_OK; slots.clear(); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -808,8 +829,9 @@ ErrCode AdvancedNotificationService::GetActiveNotifications(std::vectorPostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); notifications.clear(); for (auto record : notificationList_) { if ((record->bundleOption->GetBundleName() == bundleOption->GetBundleName()) && @@ -818,7 +840,9 @@ ErrCode AdvancedNotificationService::GetActiveNotifications(std::vectorwait(handler); + ANS_LOGE("ffrt end!"); + return ERR_OK; } ErrCode AdvancedNotificationService::GetActiveNotificationNums(uint64_t &num) @@ -830,8 +854,9 @@ ErrCode AdvancedNotificationService::GetActiveNotificationNums(uint64_t &num) return ERR_ANS_INVALID_BUNDLE; } - ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); size_t count = 0; for (auto record : notificationList_) { if ((record->bundleOption->GetBundleName() == bundleOption->GetBundleName()) && @@ -841,7 +866,9 @@ ErrCode AdvancedNotificationService::GetActiveNotificationNums(uint64_t &num) } num = static_cast(count); })); - return result; + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); + return ERR_OK; } ErrCode AdvancedNotificationService::SetNotificationAgent(const std::string &agent) @@ -875,8 +902,14 @@ ErrCode AdvancedNotificationService::SetNotificationBadgeNum(int32_t num) } ErrCode result = ERR_OK; - handler_->PostSyncTask( - std::bind([&]() { result = NotificationPreferences::GetInstance().SetTotalBadgeNums(bundleOption, num); })); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h( + std::bind([&]() { + ANS_LOGE("ffrt enter!"); + result = NotificationPreferences::GetInstance().SetTotalBadgeNums(bundleOption, num); + })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -890,8 +923,14 @@ ErrCode AdvancedNotificationService::GetBundleImportance(int32_t &importance) } ErrCode result = ERR_OK; - handler_->PostSyncTask( - std::bind([&]() { result = NotificationPreferences::GetInstance().GetImportance(bundleOption, importance); })); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h( + std::bind([&]() { + ANS_LOGE("ffrt enter!"); + result = NotificationPreferences::GetInstance().GetImportance(bundleOption, importance); + })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -915,7 +954,9 @@ ErrCode AdvancedNotificationService::Delete(const std::string &key, int32_t remo ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr notification = nullptr; #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED std::string deviceId; @@ -936,6 +977,8 @@ ErrCode AdvancedNotificationService::Delete(const std::string &key, int32_t remo #endif } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -959,7 +1002,9 @@ ErrCode AdvancedNotificationService::DeleteByBundle(const sptrPostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); std::vector keys = GetNotificationKeys(bundle); for (auto key : keys) { #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED @@ -987,6 +1032,8 @@ ErrCode AdvancedNotificationService::DeleteByBundle(const sptrwait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1005,7 +1052,9 @@ ErrCode AdvancedNotificationService::DeleteAll() } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); int32_t activeUserId = SUBSCRIBE_USER_INIT; (void)GetActiveUserId(activeUserId); std::vector keys = GetNotificationKeys(nullptr); @@ -1035,6 +1084,8 @@ ErrCode AdvancedNotificationService::DeleteAll() result = ERR_OK; })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1075,13 +1126,18 @@ ErrCode AdvancedNotificationService::GetSlotsByBundle( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().GetNotificationAllSlots(bundle, slots); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_BUNDLE_NOT_EXIST) { result = ERR_OK; slots.clear(); } })); + + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1105,12 +1161,16 @@ ErrCode AdvancedNotificationService::UpdateSlots( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().UpdateNotificationSlots(bundle, slots); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_BUNDLE_NOT_EXIST) { result = ERR_ANS_PREFERENCES_NOTIFICATION_SLOT_TYPE_NOT_EXIST; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); if (result == ERR_OK) { PublishSlotChangeCommonEvent(bundle); @@ -1139,8 +1199,14 @@ ErrCode AdvancedNotificationService::SetShowBadgeEnabledForBundle( } ErrCode result = ERR_OK; - handler_->PostSyncTask( - std::bind([&]() { result = NotificationPreferences::GetInstance().SetShowBadge(bundle, enabled); })); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h( + std::bind([&]() { + result = NotificationPreferences::GetInstance().SetShowBadge(bundle, enabled); + ANS_LOGE("ffrt enter!"); + })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1164,13 +1230,17 @@ ErrCode AdvancedNotificationService::GetShowBadgeEnabledForBundle( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().IsShowBadge(bundle, enabled); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_BUNDLE_NOT_EXIST) { result = ERR_OK; enabled = false; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1184,13 +1254,17 @@ ErrCode AdvancedNotificationService::GetShowBadgeEnabled(bool &enabled) } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().IsShowBadge(bundleOption, enabled); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_BUNDLE_NOT_EXIST) { result = ERR_OK; enabled = false; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1338,9 +1412,13 @@ ErrCode AdvancedNotificationService::GetSlotByType( return ERR_ANS_INVALID_BUNDLE; } - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); NotificationPreferences::GetInstance().GetNotificationSlot(bundleOption, slotType, slot); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); // if get slot failed, it still return ok. return ERR_OK; } @@ -1354,9 +1432,13 @@ ErrCode AdvancedNotificationService::RemoveSlotByType(const NotificationConstant return ERR_ANS_INVALID_BUNDLE; } - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); NotificationPreferences::GetInstance().RemoveNotificationSlot(bundleOption, slotType); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); // if remove slot failed, it still return ok. return ERR_OK; } @@ -1374,8 +1456,9 @@ ErrCode AdvancedNotificationService::GetAllActiveNotifications(std::vectorPostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); notifications.clear(); for (auto record : notificationList_) { if (record->notification != nullptr) { @@ -1383,7 +1466,9 @@ ErrCode AdvancedNotificationService::GetAllActiveNotifications(std::vectorwait(handler); + ANS_LOGE("ffrt end!"); + return ERR_OK; } inline bool IsContained(const std::vector &vec, const std::string &target) @@ -1416,15 +1501,18 @@ ErrCode AdvancedNotificationService::GetSpecialActiveNotifications( return ERR_ANS_PERMISSION_DENIED; } - ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); for (auto record : notificationList_) { if (IsContained(key, record->notification->GetKey())) { notifications.push_back(record->notification); } } })); - return result; + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); + return ERR_OK; } ErrCode AdvancedNotificationService::RequestEnableNotification( @@ -1493,7 +1581,9 @@ ErrCode AdvancedNotificationService::SetNotificationsEnabledForAllBundles(const } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); if (deviceId.empty()) { // Local device result = NotificationPreferences::GetInstance().SetNotificationsEnabled(userId, enabled); @@ -1501,6 +1591,8 @@ ErrCode AdvancedNotificationService::SetNotificationsEnabledForAllBundles(const // Remote device } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1528,7 +1620,9 @@ ErrCode AdvancedNotificationService::SetNotificationsEnabledForSpecialBundle( new EnabledNotificationCallbackData(bundle->GetBundleName(), bundle->GetUid(), enabled); ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start! 123"); + // ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); if (deviceId.empty()) { // Local device result = NotificationPreferences::GetInstance().SetNotificationsEnabledForBundle(bundle, enabled); @@ -1542,7 +1636,9 @@ ErrCode AdvancedNotificationService::SetNotificationsEnabledForSpecialBundle( } else { // Remote revice } - })); + // })); + // notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); SendEnableNotificationHiSysEvent(bundleOption, enabled, result); return result; @@ -1567,10 +1663,14 @@ ErrCode AdvancedNotificationService::IsAllowedNotify(bool &allowed) } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); allowed = false; result = NotificationPreferences::GetInstance().GetNotificationsEnabled(userId, allowed); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1599,7 +1699,12 @@ ErrCode AdvancedNotificationService::IsAllowedNotifySelf(const sptrPostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start! 123"); + + + + // ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); allowed = false; result = NotificationPreferences::GetInstance().GetNotificationsEnabled(userId, allowed); if (result == ERR_OK && allowed) { @@ -1610,7 +1715,9 @@ ErrCode AdvancedNotificationService::IsAllowedNotifySelf(const sptrwait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1676,7 +1783,11 @@ ErrCode AdvancedNotificationService::IsSpecialBundleAllowedNotify( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start! 123"); + + + // ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); allowed = false; result = NotificationPreferences::GetInstance().GetNotificationsEnabled(userId, allowed); if (result == ERR_OK && allowed) { @@ -1687,7 +1798,9 @@ ErrCode AdvancedNotificationService::IsSpecialBundleAllowedNotify( SetNotificationsEnabledForSpecialBundle("", bundleOption, allowed); } } - })); + // })); + //notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1733,7 +1846,9 @@ ErrCode AdvancedNotificationService::PublishContinuousTaskNotification(const spt record->notification->SetSourceType(NotificationConstant::SourceType::TYPE_CONTINUOUS); } - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); if (!IsNotificationExists(record->notification->GetKey())) { AddToNotificationList(record); } else { @@ -1749,6 +1864,8 @@ ErrCode AdvancedNotificationService::PublishContinuousTaskNotification(const spt sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyConsumed(record->notification, sortingMap); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1764,7 +1881,9 @@ ErrCode AdvancedNotificationService::CancelContinuousTaskNotification(const std: int32_t uid = IPCSkeleton::GetCallingUid(); ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr notification = nullptr; for (auto record : notificationList_) { if ((record->bundleOption->GetBundleName().empty()) && (record->bundleOption->GetUid() == uid) && @@ -1782,6 +1901,8 @@ ErrCode AdvancedNotificationService::CancelContinuousTaskNotification(const std: NotificationSubscriberManager::GetInstance()->NotifyCanceled(notification, sortingMap, reason); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -2146,7 +2267,9 @@ void AdvancedNotificationService::OnBundleRemoved(const sptrPostTask(std::bind([this, bundleOption]() { + ANS_LOGE("ffrt start!"); + notificationSvrQueue_->submit(std::bind([this, bundleOption]() { + ANS_LOGE("ffrt enter!"); ErrCode result = NotificationPreferences::GetInstance().RemoveNotificationForBundle(bundleOption); if (result != ERR_OK) { ANS_LOGW("NotificationPreferences::RemoveNotificationForBundle failed: %{public}d", result); @@ -2178,6 +2301,7 @@ void AdvancedNotificationService::OnBundleRemoved(const sptrPostTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); NotificationPreferences::GetInstance().OnDistributedKvStoreDeathRecipient(); #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED DistributedNotificationManager::GetInstance()->OnDistributedKvStoreDeathRecipient(); #endif })); + ANS_LOGE("ffrt end!"); } ErrCode AdvancedNotificationService::RemoveAllSlots() @@ -2217,12 +2344,16 @@ ErrCode AdvancedNotificationService::RemoveAllSlots() } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().RemoveNotificationAllSlots(bundleOption); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_BUNDLE_NOT_EXIST) { result = ERR_OK; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -2236,7 +2367,9 @@ ErrCode AdvancedNotificationService::AddSlotByType(NotificationConstant::SlotTyp } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr slot; result = NotificationPreferences::GetInstance().GetNotificationSlot(bundleOption, slotType, slot); if ((result == ERR_OK) && (slot != nullptr)) { @@ -2248,6 +2381,8 @@ ErrCode AdvancedNotificationService::AddSlotByType(NotificationConstant::SlotTyp result = NotificationPreferences::GetInstance().AddNotificationSlots(bundleOption, slots); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -2273,7 +2408,9 @@ ErrCode AdvancedNotificationService::RemoveNotification(const sptrPostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr notification = nullptr; sptr notificationRequest = nullptr; @@ -2316,6 +2453,8 @@ ErrCode AdvancedNotificationService::RemoveNotification(const sptrwait(handler); + ANS_LOGE("ffrt end!"); SendRemoveHiSysEvent(notificationId, label, bundleOption, result); return result; @@ -2340,7 +2479,9 @@ ErrCode AdvancedNotificationService::RemoveAllNotifications(const sptrPostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); std::vector> removeList; for (auto record : notificationList_) { if (!record->notification->IsRemoveAllowed()) { @@ -2372,6 +2513,8 @@ ErrCode AdvancedNotificationService::RemoveAllNotifications(const sptrrequest); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -2397,13 +2540,17 @@ ErrCode AdvancedNotificationService::GetSlotNumAsBundle( ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().GetNotificationSlotsNumForBundle(bundle, num); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_BUNDLE_NOT_EXIST) { result = ERR_OK; num = 0; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -2421,7 +2568,9 @@ ErrCode AdvancedNotificationService::CancelGroup(const std::string &groupName) return ERR_ANS_INVALID_BUNDLE; } - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); std::vector> removeList; for (auto record : notificationList_) { if ((record->bundleOption->GetBundleName() == bundleOption->GetBundleName()) && @@ -2448,6 +2597,8 @@ ErrCode AdvancedNotificationService::CancelGroup(const std::string &groupName) } } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -2475,7 +2626,9 @@ ErrCode AdvancedNotificationService::RemoveGroupByBundle( return ERR_ANS_INVALID_BUNDLE; } - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); std::vector> removeList; for (auto record : notificationList_) { if (!record->notification->IsRemoveAllowed()) { @@ -2505,6 +2658,8 @@ ErrCode AdvancedNotificationService::RemoveGroupByBundle( } } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -2648,13 +2803,17 @@ ErrCode AdvancedNotificationService::IsDistributedEnabled(bool &enabled) ANS_LOGD("%{public}s", __FUNCTION__); #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = DistributedPreferences::GetInstance()->GetDistributedEnable(enabled); if (result != ERR_OK) { result = ERR_OK; enabled = false; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; #else return ERR_INVALID_OPERATION; @@ -2676,8 +2835,14 @@ ErrCode AdvancedNotificationService::EnableDistributed(bool enabled) } ErrCode result = ERR_OK; - handler_->PostSyncTask( - std::bind([&]() { result = DistributedPreferences::GetInstance()->SetDistributedEnable(enabled); })); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h( + std::bind([&]() { + result = DistributedPreferences::GetInstance()->SetDistributedEnable(enabled); + ANS_LOGE("ffrt enter!"); + })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; #else return ERR_INVALID_OPERATION; @@ -2712,13 +2877,17 @@ ErrCode AdvancedNotificationService::EnableDistributedByBundle( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = DistributedPreferences::GetInstance()->SetDistributedBundleEnable(bundle, enabled); if (result != ERR_OK) { result = ERR_OK; enabled = false; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; #else return ERR_INVALID_OPERATION; @@ -2742,8 +2911,14 @@ ErrCode AdvancedNotificationService::EnableDistributedSelf(const bool enabled) } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind( - [&]() { result = DistributedPreferences::GetInstance()->SetDistributedBundleEnable(bundleOption, enabled); })); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind( + [&]() { + ANS_LOGE("ffrt enter!"); + result = DistributedPreferences::GetInstance()->SetDistributedBundleEnable(bundleOption, enabled); + })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; #else return ERR_INVALID_OPERATION; @@ -2779,13 +2954,17 @@ ErrCode AdvancedNotificationService::IsDistributedEnableByBundle( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = DistributedPreferences::GetInstance()->GetDistributedBundleEnable(bundle, enabled); if (result != ERR_OK) { result = ERR_OK; enabled = false; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; #else return ERR_INVALID_OPERATION; @@ -2806,7 +2985,10 @@ ErrCode AdvancedNotificationService::GetDeviceRemindType(NotificationConstant::R } #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED - handler_->PostSyncTask(std::bind([&]() { remindType = GetRemindType(); })); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { remindType = GetRemindType(); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; #else return ERR_INVALID_OPERATION; @@ -2962,7 +3144,9 @@ void AdvancedNotificationService::OnDistributedPublish( return; } - handler_->PostTask(std::bind([this, deviceId, bundleName, request, activeUserId]() { + ANS_LOGE("ffrt start!"); + notificationSvrQueue_->submit(std::bind([this, deviceId, bundleName, request, activeUserId]() { + ANS_LOGE("ffrt enter!"); if (!CheckDistributedNotificationType(request)) { ANS_LOGD("device type not support display."); return; @@ -3015,6 +3199,7 @@ void AdvancedNotificationService::OnDistributedPublish( sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyConsumed(record->notification, sortingMap); })); + ANS_LOGE("ffrt end!"); } void AdvancedNotificationService::OnDistributedUpdate( @@ -3027,7 +3212,9 @@ void AdvancedNotificationService::OnDistributedUpdate( return; } - handler_->PostTask(std::bind([this, deviceId, bundleName, request, activeUserId]() { + ANS_LOGE("ffrt start!"); + notificationSvrQueue_->submit(std::bind([this, deviceId, bundleName, request, activeUserId]() { + ANS_LOGE("ffrt enter!"); if (!CheckDistributedNotificationType(request)) { ANS_LOGD("device type not support display."); return; @@ -3084,13 +3271,16 @@ void AdvancedNotificationService::OnDistributedUpdate( sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyConsumed(record->notification, sortingMap); })); + ANS_LOGE("ffrt end!"); } void AdvancedNotificationService::OnDistributedDelete( const std::string &deviceId, const std::string &bundleName, const std::string &label, int32_t id) { ANS_LOGD("%{public}s", __FUNCTION__); - handler_->PostTask(std::bind([this, deviceId, bundleName, label, id]() { + ANS_LOGE("ffrt start!"); + notificationSvrQueue_->submit(std::bind([this, deviceId, bundleName, label, id]() { + ANS_LOGE("ffrt enter!"); int32_t activeUserId = -1; if (!GetActiveUserId(activeUserId)) { ANS_LOGE("Failed to get active user id!"); @@ -3130,6 +3320,7 @@ void AdvancedNotificationService::OnDistributedDelete( NotificationSubscriberManager::GetInstance()->NotifyCanceled(notification, sortingMap, reason); } })); + ANS_LOGE("ffrt end!"); } ErrCode AdvancedNotificationService::GetDistributedEnableInApplicationInfo( @@ -3191,10 +3382,14 @@ ErrCode AdvancedNotificationService::IsSupportTemplate(const std::string& templa { ANS_LOGD("%{public}s", __FUNCTION__); ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); support = false; result = NotificationPreferences::GetInstance().GetTemplateSupported(templateName, support); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3237,10 +3432,14 @@ ErrCode AdvancedNotificationService::IsSpecialUserAllowedNotify(const int32_t &u } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); allowed = false; result = NotificationPreferences::GetInstance().GetNotificationsEnabled(userId, allowed); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3258,9 +3457,13 @@ ErrCode AdvancedNotificationService::SetNotificationsEnabledByUser(const int32_t } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().SetNotificationsEnabled(userId, enabled); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3279,7 +3482,9 @@ ErrCode AdvancedNotificationService::DeleteAllByUser(const int32_t &userId) } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); std::vector keys = GetNotificationKeys(nullptr); for (auto key : keys) { #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED @@ -3307,6 +3512,8 @@ ErrCode AdvancedNotificationService::DeleteAllByUser(const int32_t &userId) result = ERR_OK; })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3398,12 +3605,16 @@ ErrCode AdvancedNotificationService::SetDoNotDisturbDateByUser(const int32_t &us return ERR_ANS_INVALID_BUNDLE; } - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().SetDoNotDisturbDate(userId, newConfig); if (result == ERR_OK) { NotificationSubscriberManager::GetInstance()->NotifyDoNotDisturbDateChanged(newConfig); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -3413,7 +3624,9 @@ ErrCode AdvancedNotificationService::GetDoNotDisturbDateByUser(const int32_t &us { ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr currentConfig = nullptr; result = NotificationPreferences::GetInstance().GetDoNotDisturbDate(userId, currentConfig); if (result == ERR_OK) { @@ -3434,6 +3647,8 @@ ErrCode AdvancedNotificationService::GetDoNotDisturbDateByUser(const int32_t &us } } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -3443,9 +3658,13 @@ ErrCode AdvancedNotificationService::SetHasPoppedDialog( { ANS_LOGD("%{public}s", __FUNCTION__); ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().SetHasPoppedDialog(bundleOption, hasPopped); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3454,9 +3673,13 @@ ErrCode AdvancedNotificationService::GetHasPoppedDialog( { ANS_LOGD("%{public}s", __FUNCTION__); ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = NotificationPreferences::GetInstance().GetHasPoppedDialog(bundleOption, hasPopped); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3474,14 +3697,20 @@ void AdvancedNotificationService::OnResourceRemove(int32_t userId) { DeleteAllByUser(userId); - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); NotificationPreferences::GetInstance().RemoveSettings(userId); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); } void AdvancedNotificationService::OnBundleDataCleared(const sptr &bundleOption) { - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); std::vector keys = GetNotificationKeys(bundleOption); for (auto key : keys) { #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED @@ -3508,6 +3737,8 @@ void AdvancedNotificationService::OnBundleDataCleared(const sptrwait(handler); + ANS_LOGE("ffrt end!"); } void AdvancedNotificationService::GetDisplayPosition( @@ -3569,7 +3800,8 @@ ErrCode AdvancedNotificationService::SetEnabledForBundleSlot( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { sptr slot; result = NotificationPreferences::GetInstance().GetNotificationSlot(bundle, slotType, slot); if (result == ERR_ANS_PREFERENCES_NOTIFICATION_SLOT_TYPE_NOT_EXIST || @@ -3601,6 +3833,8 @@ ErrCode AdvancedNotificationService::SetEnabledForBundleSlot( PublishSlotChangeCommonEvent(bundle); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); SendEnableNotificationSlotHiSysEvent(bundleOption, slotType, enabled, result); return result; @@ -3626,7 +3860,9 @@ ErrCode AdvancedNotificationService::GetEnabledForBundleSlot( } ErrCode result = ERR_OK; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); sptr slot; result = NotificationPreferences::GetInstance().GetNotificationSlot(bundle, slotType, slot); if (result != ERR_OK) { @@ -3641,6 +3877,8 @@ ErrCode AdvancedNotificationService::GetEnabledForBundleSlot( } enabled = slot->GetEnable(); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3677,7 +3915,9 @@ ErrCode AdvancedNotificationService::ShellDump(const std::string &cmd, const std } ErrCode result = ERR_ANS_NOT_ALLOWED; - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h(std::bind([&]() { + ANS_LOGE("ffrt enter!"); if (cmd == ACTIVE_NOTIFICATION_OPTION) { result = ActiveNotificationDump(bundle, userId, dumpInfo); } else if (cmd == RECENT_NOTIFICATION_OPTION) { @@ -3692,6 +3932,8 @@ ErrCode AdvancedNotificationService::ShellDump(const std::string &cmd, const std result = ERR_ANS_INVALID_PARAM; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3895,10 +4137,14 @@ ErrCode AdvancedNotificationService::SetSyncNotificationEnabledWithoutApp(const } ErrCode result = ERR_OK; - handler_->PostSyncTask( + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h( std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = DistributedPreferences::GetInstance()->SetSyncEnabledWithoutApp(userId, enabled); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; #else return ERR_INVALID_OPERATION; @@ -3920,10 +4166,14 @@ ErrCode AdvancedNotificationService::GetSyncNotificationEnabledWithoutApp(const } ErrCode result = ERR_OK; - handler_->PostSyncTask( + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h( std::bind([&]() { + ANS_LOGE("ffrt enter!"); result = DistributedPreferences::GetInstance()->GetSyncEnabledWithoutApp(userId, enabled); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; #else return ERR_INVALID_OPERATION; @@ -3984,7 +4234,8 @@ ErrCode AdvancedNotificationService::PublishNotificationBySa(const sptrPostSyncTask([this, &record]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h([this, &record]() { if (AssignToNotificationList(record) != ERR_OK) { ANS_LOGE("Failed to assign notification list"); return; @@ -3994,6 +4245,8 @@ ErrCode AdvancedNotificationService::PublishNotificationBySa(const sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyConsumed(record->notification, sortingMap); }); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -4009,13 +4262,13 @@ ErrCode AdvancedNotificationService::SetBadgeNumber(int32_t badgeNumber) return ERR_ANS_NO_MEMORY; } - if (!handler_) { - ANS_LOGE("handler_ is null."); - return ERR_ANS_TASK_ERR; - } - handler_->PostSyncTask(std::bind([&]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSvrQueue_->submit_h([&]() { + ANS_LOGE("ffrt enter!"); NotificationSubscriberManager::GetInstance()->SetBadgeNumber(badgeData); - })); + }); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -4063,8 +4316,8 @@ ErrCode AdvancedNotificationService::RegisterPushCallback(const sptrAddDeathRecipient(pushRecipient_); + pushCallBack_ = iface_cast(pushCallback); ANS_LOGD("end"); return ERR_OK; @@ -4114,6 +4367,7 @@ bool AdvancedNotificationService::IsNeedPushCheck(NotificationConstant::SlotType ErrCode AdvancedNotificationService::PushCheck(const sptr &request) { + ANS_LOGD("start."); if (pushCallBack_) { nlohmann::json jsonObject; jsonObject["pkgName"] = request->GetCreatorBundleName(); @@ -4133,7 +4387,10 @@ void AdvancedNotificationService::StartAutoDelete(const std::shared_ptrnotification->GetKey()); int64_t autoDeleteTime = record->request->GetAutoDeletedTime() - GetCurrentTime(); - handler_->PostTask(triggerFunc, autoDeleteTime); + ANS_LOGE("ffrt start!"); + + ffrt::task_handle handler = notificationSvrQueue_->submit_h(triggerFunc, ffrt::task_attr().delay(autoDeleteTime * 1000)); + ANS_LOGE("ffrt end!"); } void AdvancedNotificationService::TriggerAutoDelete(std::string hashCode) @@ -4154,5 +4411,15 @@ void AdvancedNotificationService::TriggerAutoDelete(std::string hashCode) } } } + +void PushCallbackRecipient::OnRemoteDied(const wptr &remote) +{ + ANS_LOGE("Push Callback died, remove the proxy object"); + AdvancedNotificationService::GetInstance()->ResetPushCallbackProxy(); +} + +PushCallbackRecipient::PushCallbackRecipient() {} + +PushCallbackRecipient::~PushCallbackRecipient() {} } // namespace Notification } // namespace OHOS diff --git a/services/ans/src/notification_preferences.cpp b/services/ans/src/notification_preferences.cpp index 16ee92cc7d7fa59caf94340087382e55626a57c6..76d4bc62f3c184b668474c4bf02d817ecb6ae3ee 100644 --- a/services/ans/src/notification_preferences.cpp +++ b/services/ans/src/notification_preferences.cpp @@ -58,6 +58,7 @@ ErrCode NotificationPreferences::AddNotificationSlots( } } + ANS_LOGE("ffrt: add slot to db!"); if (result == ERR_OK && (!preferncesDB_->PutSlotsToDisturbeDB(bundleOption->GetBundleName(), bundleOption->GetUid(), slots))) { return ERR_ANS_PREFERENCES_NOTIFICATION_DB_OPERATION_FAILED; diff --git a/services/ans/src/notification_subscriber_manager.cpp b/services/ans/src/notification_subscriber_manager.cpp index 1b20cb165f09d0d4956d6fd3d44895e131f74bd4..a50c3dd800e589ffbe8079892cf9699c29a62906 100644 --- a/services/ans/src/notification_subscriber_manager.cpp +++ b/services/ans/src/notification_subscriber_manager.cpp @@ -39,9 +39,7 @@ struct NotificationSubscriberManager::SubscriberRecord { NotificationSubscriberManager::NotificationSubscriberManager() { - runner_ = OHOS::AppExecFwk::EventRunner::Create("NotificationSubscriberMgr"); - handler_ = std::make_shared(runner_); - AnsWatchdog::AddHandlerThread(handler_, runner_); + notificationSubQueue_ = std::make_shared("NotificationSubscriberMgr"); recipient_ = new RemoteDeathRecipient(std::bind(&NotificationSubscriberManager::OnRemoteDied, this, std::placeholders::_1)); } @@ -83,10 +81,17 @@ ErrCode NotificationSubscriberManager::AddSubscriber( } ErrCode result = ERR_ANS_TASK_ERR; - handler_->PostSyncTask(std::bind([this, &subscriber, &subInfo, &result]() { + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); + return result; + } + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSubQueue_->submit_h(std::bind([this, &subscriber, &subInfo, &result]() { + ANS_LOGE("ffrt enter!"); result = this->AddSubscriberInner(subscriber, subInfo); - }), - AppExecFwk::EventQueue::Priority::HIGH); + })/*, AppExecFwk::EventQueue::Priority::HIGH*/); + notificationSubQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -100,10 +105,17 @@ ErrCode NotificationSubscriberManager::RemoveSubscriber( } ErrCode result = ERR_ANS_TASK_ERR; - handler_->PostSyncTask(std::bind([this, &subscriber, &subscribeInfo, &result]() { + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); + return result; + } + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = notificationSubQueue_->submit_h(std::bind([this, &subscriber, &subscribeInfo, &result]() { + ANS_LOGE("ffrt enter!"); result = this->RemoveSubscriberInner(subscriber, subscribeInfo); - }), - AppExecFwk::EventQueue::Priority::HIGH); + })/*, AppExecFwk::EventQueue::Priority::HIGH*/); + notificationSubQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -111,83 +123,96 @@ void NotificationSubscriberManager::NotifyConsumed( const sptr ¬ification, const sptr ¬ificationMap) { HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); - if (handler_ == nullptr) { - ANS_LOGE("handler is nullptr"); + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); return; } AppExecFwk::EventHandler::Callback NotifyConsumedFunc = std::bind(&NotificationSubscriberManager::NotifyConsumedInner, this, notification, notificationMap); - handler_->PostTask(NotifyConsumedFunc); + ANS_LOGE("ffrt start!"); + notificationSubQueue_->submit(NotifyConsumedFunc); + ANS_LOGE("ffrt end!"); } void NotificationSubscriberManager::NotifyCanceled( const sptr ¬ification, const sptr ¬ificationMap, int32_t deleteReason) { HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); - if (handler_ == nullptr) { - ANS_LOGE("handler is nullptr"); + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); return; } - AppExecFwk::EventHandler::Callback NotifyCanceledFunc = std::bind( &NotificationSubscriberManager::NotifyCanceledInner, this, notification, notificationMap, deleteReason); - handler_->PostTask(NotifyCanceledFunc); + ANS_LOGE("ffrt start!"); + notificationSubQueue_->submit(NotifyCanceledFunc); + ANS_LOGE("ffrt end!"); } void NotificationSubscriberManager::NotifyUpdated(const sptr ¬ificationMap) { - if (handler_ == nullptr) { - ANS_LOGE("handler is nullptr"); + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); return; } - AppExecFwk::EventHandler::Callback NotifyUpdatedFunc = std::bind(&NotificationSubscriberManager::NotifyUpdatedInner, this, notificationMap); - handler_->PostTask(NotifyUpdatedFunc); + ANS_LOGE("ffrt start!"); + notificationSubQueue_->submit(NotifyUpdatedFunc); + ANS_LOGE("ffrt end!"); } void NotificationSubscriberManager::NotifyDoNotDisturbDateChanged(const sptr &date) { - if (handler_ == nullptr) { - ANS_LOGE("handler is nullptr"); + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); return; } - AppExecFwk::EventHandler::Callback func = std::bind(&NotificationSubscriberManager::NotifyDoNotDisturbDateChangedInner, this, date); - handler_->PostTask(func); + ANS_LOGE("ffrt start!"); + notificationSubQueue_->submit(func); + ANS_LOGE("ffrt end!"); } void NotificationSubscriberManager::NotifyEnabledNotificationChanged( const sptr &callbackData) { HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); - if (handler_ == nullptr) { - ANS_LOGE("handler is nullptr"); + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); return; } - AppExecFwk::EventHandler::Callback func = std::bind(&NotificationSubscriberManager::NotifyEnabledNotificationChangedInner, this, callbackData); - handler_->PostTask(func); + ANS_LOGE("ffrt start!"); + notificationSubQueue_->submit(func); + ANS_LOGE("ffrt end!"); } void NotificationSubscriberManager::OnRemoteDied(const wptr &object) { ANS_LOGI("OnRemoteDied"); - handler_->PostSyncTask(std::bind([this, object]() { + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); + return; + } + ffrt::task_handle handler = notificationSubQueue_->submit_h(std::bind([this, object]() { + ANS_LOGE("ffrt enter!"); std::shared_ptr record = FindSubscriberRecord(object); if (record != nullptr) { ANS_LOGW("subscriber removed."); subscriberRecordList_.remove(record); } - }), - AppExecFwk::EventQueue::Priority::HIGH); + })/*, AppExecFwk::EventQueue::Priority::HIGH*/); + ANS_LOGE("ffrt start!"); + notificationSubQueue_->wait(handler); + ANS_LOGE("ffrt end!"); } std::shared_ptr NotificationSubscriberManager::FindSubscriberRecord( @@ -312,6 +337,7 @@ ErrCode NotificationSubscriberManager::RemoveSubscriberInner( void NotificationSubscriberManager::NotifyConsumedInner( const sptr ¬ification, const sptr ¬ificationMap) { + ANS_LOGE("ffrt enter!"); HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); ANS_LOGD("%{public}s notification->GetUserId <%{public}d>", __FUNCTION__, notification->GetUserId()); int32_t recvUserId = notification->GetNotificationRequest().GetReceiverUserId(); @@ -335,6 +361,7 @@ void NotificationSubscriberManager::NotifyConsumedInner( void NotificationSubscriberManager::NotifyCanceledInner( const sptr ¬ification, const sptr ¬ificationMap, int32_t deleteReason) { + ANS_LOGE("ffrt enter!"); HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); ANS_LOGD("%{public}s notification->GetUserId <%{public}d>", __FUNCTION__, notification->GetUserId()); int32_t recvUserId = notification->GetNotificationRequest().GetReceiverUserId(); @@ -356,6 +383,7 @@ void NotificationSubscriberManager::NotifyCanceledInner( void NotificationSubscriberManager::NotifyUpdatedInner(const sptr ¬ificationMap) { + ANS_LOGE("ffrt enter!"); for (auto record : subscriberRecordList_) { record->subscriber->OnUpdated(notificationMap); } @@ -363,6 +391,7 @@ void NotificationSubscriberManager::NotifyUpdatedInner(const sptr &date) { + ANS_LOGE("ffrt enter!"); for (auto record : subscriberRecordList_) { record->subscriber->OnDoNotDisturbDateChange(date); } @@ -376,6 +405,7 @@ bool NotificationSubscriberManager::IsSystemUser(int32_t userId) void NotificationSubscriberManager::NotifyEnabledNotificationChangedInner( const sptr &callbackData) { + ANS_LOGE("ffrt enter!"); for (auto record : subscriberRecordList_) { record->subscriber->OnEnabledNotificationChanged(callbackData); } @@ -383,17 +413,18 @@ void NotificationSubscriberManager::NotifyEnabledNotificationChangedInner( void NotificationSubscriberManager::SetBadgeNumber(const sptr &badgeData) { - if (handler_ == nullptr) { - ANS_LOGE("handler is nullptr"); + if (notificationSubQueue_ == nullptr) { + ANS_LOGE("queue is nullptr"); return; } - std::function setBadgeNumberFunc = [badgeData] () { for (auto record : NotificationSubscriberManager::GetInstance()->subscriberRecordList_) { record->subscriber->OnBadgeChanged(badgeData); } }; - handler_->PostTask(setBadgeNumberFunc); + ANS_LOGE("ffrt start!"); + notificationSubQueue_->submit(setBadgeNumberFunc); + ANS_LOGE("ffrt end!"); } } // namespace Notification } // namespace OHOS diff --git a/services/ans/test/unittest/BUILD.gn b/services/ans/test/unittest/BUILD.gn index 929770bf44c9a34cbc639eb03a7c16e5c0f94e04..532b432d40d69a4bf9f93db5d11f7cbc576facd7 100644 --- a/services/ans/test/unittest/BUILD.gn +++ b/services/ans/test/unittest/BUILD.gn @@ -66,9 +66,9 @@ ohos_unittest("reminder_unit_test") { "common_event_service:cesfwk_innerkits", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -87,7 +87,7 @@ ohos_unittest("reminder_unit_test") { cflags = [] if (hisysevent_usage) { - external_deps += [ "hisysevent_native:libhisysevent" ] + external_deps += [ "hisysevent:libhisysevent" ] cflags += [ "-DHAS_HISYSEVENT_PART" ] } @@ -102,6 +102,7 @@ ohos_unittest("ans_unit_test") { "include", "/${services_path}/ans/include", "${services_path}/ans/test/unittest/mock/include", + "${ffrt_path}/interfaces/kits", ] defines = [] @@ -155,9 +156,10 @@ ohos_unittest("ans_unit_test") { "common_event_service:cesfwk_innerkits", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", - "hiviewdfx_hilog_native:libhilog", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -176,7 +178,7 @@ ohos_unittest("ans_unit_test") { cflags = [] if (hisysevent_usage) { - external_deps += [ "hisysevent_native:libhisysevent" ] + external_deps += [ "hisysevent:libhisysevent" ] cflags += [ "-DHAS_HISYSEVENT_PART" ] } @@ -215,9 +217,9 @@ ohos_unittest("access_token_helper_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -266,8 +268,8 @@ ohos_unittest("bundle_manager_helper_branch_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -317,8 +319,8 @@ ohos_unittest("notification_dialog_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -342,6 +344,7 @@ ohos_unittest("notification_subscriber_manager_branch_test") { "include", "/${services_path}/ans/include", "${services_path}/ans/test/unittest/mock/include", + "${ffrt_path}/interfaces/kits", ] defines = [] @@ -382,8 +385,9 @@ ohos_unittest("notification_subscriber_manager_branch_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "ffrt:libffrt", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -407,6 +411,7 @@ ohos_unittest("advanced_notification_service_branch_test") { "include", "/${services_path}/ans/include", "${services_path}/ans/test/unittest/mock/include", + "${ffrt_path}/interfaces/kits", ] defines = [] @@ -451,8 +456,9 @@ ohos_unittest("advanced_notification_service_branch_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "ffrt:libffrt", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -502,8 +508,8 @@ ohos_unittest("notification_preferences_database_branch_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -549,8 +555,8 @@ ohos_unittest("push_callback_stub_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -602,8 +608,8 @@ ohos_unittest("notification_rdb_data_mgr_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", diff --git a/services/distributed/BUILD.gn b/services/distributed/BUILD.gn index 54edfd6fb370f129151948e1e1dc4506c7ca42b6..9a124f15bcf5db867941b1b0ac28b67fd41fe372 100644 --- a/services/distributed/BUILD.gn +++ b/services/distributed/BUILD.gn @@ -15,7 +15,10 @@ import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") config("ans_distributed_config") { - include_dirs = [ "${services_path}/distributed/include" ] + include_dirs = [ + "${services_path}/distributed/include", + "${ffrt_path}/interfaces/kits", + ] } ohos_shared_library("libans_distributed") { @@ -47,8 +50,9 @@ ohos_shared_library("libans_distributed") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hiviewdfx_hilog_native:libhilog", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", "kv_store:distributeddata_inner", ] diff --git a/services/distributed/include/distributed_notification_manager.h b/services/distributed/include/distributed_notification_manager.h index 9d453e155ca9d1a90e584f19c1009d3e86a52cf8..422aacc7ab7c051df113aca47df089d7a6488b63 100644 --- a/services/distributed/include/distributed_notification_manager.h +++ b/services/distributed/include/distributed_notification_manager.h @@ -22,6 +22,7 @@ #include "event_handler.h" #include "event_runner.h" +#include "ffrt.h" #include "distributed_database.h" #include "distributed_database_callback.h" @@ -166,6 +167,7 @@ private: std::shared_ptr databaseCb_; std::shared_ptr deviceCb_; IDistributedCallback callback_ = {0}; + std::shared_ptr distributedQueue_ = nullptr; DECLARE_DELAYED_SINGLETON(DistributedNotificationManager); DISALLOW_COPY_AND_MOVE(DistributedNotificationManager); diff --git a/services/distributed/src/distributed_notification_manager.cpp b/services/distributed/src/distributed_notification_manager.cpp index 073060a6cf342d62ede37e3321e3269e98d746b9..7e38d94c97fe8629c52dd4049bd87c09bfbd721a 100644 --- a/services/distributed/src/distributed_notification_manager.cpp +++ b/services/distributed/src/distributed_notification_manager.cpp @@ -30,9 +30,7 @@ const std::string DELIMITER = "|"; DistributedNotificationManager::DistributedNotificationManager() { - runner_ = OHOS::AppExecFwk::EventRunner::Create("NotificationDistributedMgr"); - handler_ = std::make_shared(runner_); - AnsWatchdog::AddHandlerThread(handler_, runner_); + distributedQueue_ = std::make_shared("NotificationDistributedMgr"); DistributedDatabaseCallback::IDatabaseChange databaseCallback = { .OnInsert = std::bind(&DistributedNotificationManager::OnDatabaseInsert, @@ -68,7 +66,10 @@ DistributedNotificationManager::DistributedNotificationManager() DistributedNotificationManager::~DistributedNotificationManager() { - handler_->PostSyncTask(std::bind([&]() { callback_ = {}; }), AppExecFwk::EventHandler::Priority::HIGH); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = distributedQueue_->submit_h(std::bind([&]() { callback_ = {}; })); + distributedQueue_->wait(handler); + ANS_LOGE("ffrt end!"); } void DistributedNotificationManager::GenerateDistributedKey( @@ -131,7 +132,9 @@ void DistributedNotificationManager::OnDatabaseInsert( const std::string &deviceId, const std::string &key, const std::string &value) { ANS_LOGD("%{public}s", __FUNCTION__); - handler_->PostTask(std::bind([=]() { + ANS_LOGE("ffrt start!"); + distributedQueue_->submit(std::bind([=]() { + ANS_LOGE("ffrt enter!"); if (!CheckDeviceId(deviceId, key)) { ANS_LOGD("device id are not the same. deviceId:%{public}s key:%{public}s", deviceId.c_str(), key.c_str()); } @@ -151,13 +154,16 @@ void DistributedNotificationManager::OnDatabaseInsert( PublishCallback(resolveKey.deviceId, resolveKey.bundleName, request); })); + ANS_LOGE("ffrt end!"); } void DistributedNotificationManager::OnDatabaseUpdate( const std::string &deviceId, const std::string &key, const std::string &value) { ANS_LOGD("%{public}s", __FUNCTION__); - handler_->PostTask(std::bind([=]() { + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = distributedQueue_->submit_h(std::bind([=]() { + ANS_LOGE("ffrt enter!"); if (!CheckDeviceId(deviceId, key)) { ANS_LOGD("device id are not the same. deviceId:%{public}s key:%{public}s", deviceId.c_str(), key.c_str()); } @@ -177,13 +183,16 @@ void DistributedNotificationManager::OnDatabaseUpdate( UpdateCallback(resolveKey.deviceId, resolveKey.bundleName, request); })); + ANS_LOGE("ffrt end!"); } void DistributedNotificationManager::OnDatabaseDelete( const std::string &deviceId, const std::string &key, const std::string &value) { ANS_LOGD("%{public}s", __FUNCTION__); - handler_->PostTask(std::bind([=]() { + ANS_LOGE("ffrt start!"); + distributedQueue_->submit(std::bind([=]() { + ANS_LOGE("ffrt enter!"); if (!CheckDeviceId(deviceId, key)) { ANS_LOGD("device id are not the same. deviceId:%{public}s key:%{public}s", deviceId.c_str(), key.c_str()); } @@ -196,12 +205,15 @@ void DistributedNotificationManager::OnDatabaseDelete( DeleteCallback(resolveKey.deviceId, resolveKey.bundleName, resolveKey.label, resolveKey.id); })); + ANS_LOGE("ffrt end!"); } void DistributedNotificationManager::OnDeviceConnected(const std::string &deviceId) { ANS_LOGD("%{public}s", __FUNCTION__); - handler_->PostTask(std::bind([=]() { + ANS_LOGE("ffrt start!"); + distributedQueue_->submit(std::bind([=]() { + ANS_LOGE("ffrt enter!"); if (database_ == nullptr) { ANS_LOGE("OnDeviceConnected failed: database is null"); return; @@ -210,13 +222,16 @@ void DistributedNotificationManager::OnDeviceConnected(const std::string &device ANS_LOGE("OnDeviceConnected failed."); } })); + ANS_LOGE("ffrt end!"); } void DistributedNotificationManager::OnDeviceDisconnected(const std::string &deviceId) { ANS_LOGD("%{public}s", __FUNCTION__); - handler_->PostTask(std::bind([=]() { + ANS_LOGE("ffrt start!"); + distributedQueue_->submit(std::bind([=]() { + ANS_LOGE("ffrt enter!"); std::string prefixKey = deviceId + DELIMITER; std::vector entries; if (!database_->GetEntriesFromDistributedDB(prefixKey, entries)) { @@ -241,6 +256,7 @@ void DistributedNotificationManager::OnDeviceDisconnected(const std::string &dev database_->RecreateDistributedDB(); } })); + ANS_LOGE("ffrt end!"); return; } @@ -364,14 +380,20 @@ ErrCode DistributedNotificationManager::DeleteRemoteNotification( ErrCode DistributedNotificationManager::RegisterCallback(const IDistributedCallback &callback) { ANS_LOGI("%{public}s start", __FUNCTION__); - handler_->PostSyncTask(std::bind([&]() { callback_ = callback; }), AppExecFwk::EventHandler::Priority::HIGH); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = distributedQueue_->submit_h(std::bind([&]() { callback_ = callback; })); + distributedQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } ErrCode DistributedNotificationManager::UngegisterCallback(void) { ANS_LOGI("%{public}s start", __FUNCTION__); - handler_->PostSyncTask(std::bind([&]() { callback_ = {}; }), AppExecFwk::EventHandler::Priority::HIGH); + ANS_LOGE("ffrt start!"); + ffrt::task_handle handler = distributedQueue_->submit_h(std::bind([&]() { callback_ = {}; })); + distributedQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } diff --git a/services/distributed/test/unittest/BUILD.gn b/services/distributed/test/unittest/BUILD.gn index dfc759afea8b1299e1f9b9bd593d564d4ad2419d..83be3b06d94b5cf5232567c4547631bbf1ec6899 100644 --- a/services/distributed/test/unittest/BUILD.gn +++ b/services/distributed/test/unittest/BUILD.gn @@ -35,7 +35,10 @@ group("ans_unit_test") { ohos_unittest("ans_distributed_unit_test") { module_out_path = "${component_name}/unittest" - include_dirs = [ "/${services_path}/distributed/include" ] + include_dirs = [ + "/${services_path}/distributed/include", + "${ffrt_path}/interfaces/kits", + ] sources = [ "${services_path}/distributed/src/distributed_database.cpp", @@ -77,9 +80,10 @@ ohos_unittest("ans_distributed_unit_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", - "hiviewdfx_hilog_native:libhilog", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -123,9 +127,9 @@ ohos_unittest("distributed_preferences_database_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -169,9 +173,9 @@ ohos_unittest("distributed_screen_status_manager_branch_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -215,8 +219,8 @@ ohos_unittest("distributed_database_branch_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -256,8 +260,8 @@ ohos_unittest("distributed_preferences_branch_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -294,8 +298,8 @@ ohos_unittest("distributed_device_callback_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -331,8 +335,8 @@ ohos_unittest("distributed_database_callback_test") { "bundle_framework:appexecfwk_base", "c_utils:utils", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -368,8 +372,8 @@ ohos_unittest("distributed_flow_control_test") { "bundle_framework:appexecfwk_base", "c_utils:utils", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", @@ -382,7 +386,10 @@ ohos_unittest("distributed_flow_control_test") { ohos_unittest("distributed_notification_manager_branch_test") { module_out_path = "${component_name}/unittest" - include_dirs = [ "/${services_path}/distributed/include" ] + include_dirs = [ + "/${services_path}/distributed/include", + "${ffrt_path}/interfaces/kits", + ] sources = [ "distributed_notification_manager_branch_test/distributed_notification_manager_branch_test.cpp", @@ -409,8 +416,9 @@ ohos_unittest("distributed_notification_manager_branch_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", + "ffrt:libffrt", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", diff --git a/services/test/moduletest/BUILD.gn b/services/test/moduletest/BUILD.gn index 12b1fee76527408337568746e2588b68a77630f6..326e85ee237fe971a03bdfaefbe136f8324b79f1 100644 --- a/services/test/moduletest/BUILD.gn +++ b/services/test/moduletest/BUILD.gn @@ -25,6 +25,7 @@ ohos_moduletest("ans_module_test") { "${services_path}/ans/test/unittest", "${services_path}/ans/test/unittest/mock/include", "${services_path}/test/moduletest/mock/include", + "${ffrt_path}/interfaces/kits", ] sources = [ @@ -75,10 +76,11 @@ ohos_moduletest("ans_module_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hisysevent_native:libhisysevent", - "hitrace_native:hitrace_meter", - "hitrace_native:libhitracechain", - "hiviewdfx_hilog_native:libhilog", + "ffrt:libffrt", + "hilog:libhilog", + "hisysevent:libhisysevent", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", diff --git a/test/bechmarktest/notification_services_test/BUILD.gn b/test/bechmarktest/notification_services_test/BUILD.gn index 2d9f0f5ae01541c341de3d0fa1f9cf4c1b49ef84..f6331a12a62f8f10f0392fa499f6c4f10ddf1275 100644 --- a/test/bechmarktest/notification_services_test/BUILD.gn +++ b/test/bechmarktest/notification_services_test/BUILD.gn @@ -22,6 +22,7 @@ ohos_benchmarktest("Benchmark_Notification_Servece_Test") { "include", "mock/include", "${services_path}/ans/include", + "${ffrt_path}/interfaces/kits", ] sources = [ @@ -44,6 +45,7 @@ ohos_benchmarktest("Benchmark_Notification_Servece_Test") { "ability_runtime:wantagent_innerkits", "c_utils:utils", "common_event_service:cesfwk_innerkits", + "ffrt:libffrt", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", "relational_store:native_rdb", diff --git a/test/fuzztest/addnotificationslot_fuzzer/BUILD.gn b/test/fuzztest/addnotificationslot_fuzzer/BUILD.gn index 1f26e773854b11c7a7ed736e691f365c389c9981..998e11b82e40b0de0cca9fd94eb2f2eaecc1f4dd 100644 --- a/test/fuzztest/addnotificationslot_fuzzer/BUILD.gn +++ b/test/fuzztest/addnotificationslot_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("AddNotificationSlotFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn b/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn index a1d56add3e49130625445e1dacf30efeb89acd59..b0636b1eb90b69759861041f9561fc3f43565b09 100644 --- a/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn +++ b/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("AddNotificationSlotsFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/addslotbytype_fuzzer/BUILD.gn b/test/fuzztest/addslotbytype_fuzzer/BUILD.gn index 1e9646ea405d7f26add6cc13cc3d5286b717c7d3..903b72c4d55417f7c843eba0d32415dbb74e150b 100644 --- a/test/fuzztest/addslotbytype_fuzzer/BUILD.gn +++ b/test/fuzztest/addslotbytype_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("AddSlotByTypeFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/advancednotificationservice_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice_fuzzer/BUILD.gn index 9d911ff5a9354a7ae9cf884fe691fb2a11bc237b..d39c5417bebfd9340969fb53bd3d0c3c35225404 100644 --- a/test/fuzztest/advancednotificationservice_fuzzer/BUILD.gn +++ b/test/fuzztest/advancednotificationservice_fuzzer/BUILD.gn @@ -33,6 +33,7 @@ ohos_fuzztest("AdvancedNotificationServiceFuzzTest") { "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", + "${ffrt_path}/interfaces/kits", ] cflags = [ "-g", @@ -53,7 +54,8 @@ ohos_fuzztest("AdvancedNotificationServiceFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "ffrt:libffrt", + "hilog:libhilog", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", "relational_store:native_rdb", diff --git a/test/fuzztest/ansmanagerstub_fuzzer/BUILD.gn b/test/fuzztest/ansmanagerstub_fuzzer/BUILD.gn index a4671ff43964c744d67ab139e30aef5a2e407d6b..a97e173f227e7bb02afe900dafb286bf2854e5e5 100644 --- a/test/fuzztest/ansmanagerstub_fuzzer/BUILD.gn +++ b/test/fuzztest/ansmanagerstub_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("AnsManagerStubFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/ansmanagerstubannex_fuzzer/BUILD.gn b/test/fuzztest/ansmanagerstubannex_fuzzer/BUILD.gn index 7f8a8e82fb439c6c0022197da77641d215742e0a..96c8a90f2c94f2dd0865d6e3421e0cc3f58a9db5 100644 --- a/test/fuzztest/ansmanagerstubannex_fuzzer/BUILD.gn +++ b/test/fuzztest/ansmanagerstubannex_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("AnsManagerStubAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/ansmanagerstubannexthree_fuzzer/BUILD.gn b/test/fuzztest/ansmanagerstubannexthree_fuzzer/BUILD.gn index 69d0849c61e8b011eb7cb012d3f28d33a0757269..57b4fd42eb36fa70301453d749a9af6a047c3c74 100644 --- a/test/fuzztest/ansmanagerstubannexthree_fuzzer/BUILD.gn +++ b/test/fuzztest/ansmanagerstubannexthree_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("AnsManagerStubAnnexThreeFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/ansmanagerstubannextwo_fuzzer/BUILD.gn b/test/fuzztest/ansmanagerstubannextwo_fuzzer/BUILD.gn index ab0e817f3dc5b515cf81afa584cafe4a8e938a8e..593424910c68f88a8ee0a2ee76838fe6c7f909a2 100644 --- a/test/fuzztest/ansmanagerstubannextwo_fuzzer/BUILD.gn +++ b/test/fuzztest/ansmanagerstubannextwo_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("AnsManagerStubAnnexTwoFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/anssubscriberproxy_fuzzer/BUILD.gn b/test/fuzztest/anssubscriberproxy_fuzzer/BUILD.gn index e9ece18837cf1e44b6d57a2bb4a3f622bc4074e2..742ac8c8e71edd3268be9429d68410eb4018fcfe 100644 --- a/test/fuzztest/anssubscriberproxy_fuzzer/BUILD.gn +++ b/test/fuzztest/anssubscriberproxy_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("AnsSubscriberProxyFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/anssubscriberstub_fuzzer/BUILD.gn b/test/fuzztest/anssubscriberstub_fuzzer/BUILD.gn index cba93826cfb6ce0fc0063c9eeb35f5f7df5593b7..a3d8938b2bbb1c25daab8ed5cea88f2ca49040bd 100644 --- a/test/fuzztest/anssubscriberstub_fuzzer/BUILD.gn +++ b/test/fuzztest/anssubscriberstub_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("AnsSubscriberStubFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/cancelasbundle_fuzzer/BUILD.gn b/test/fuzztest/cancelasbundle_fuzzer/BUILD.gn index d57aa11bf32ce64cbe0f8771de88412bf222b691..d99a2eb81ad1f5a7e43a059a28b21957c18f452b 100644 --- a/test/fuzztest/cancelasbundle_fuzzer/BUILD.gn +++ b/test/fuzztest/cancelasbundle_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("CancelAsBundleFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/cancelgroup_fuzzer/BUILD.gn b/test/fuzztest/cancelgroup_fuzzer/BUILD.gn index 11eaa77f9233d0575c8326e2ecabfef83e6f538b..364495e7adf2082ae706bd52e250b7809700d4a4 100644 --- a/test/fuzztest/cancelgroup_fuzzer/BUILD.gn +++ b/test/fuzztest/cancelgroup_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("CancelGroupFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/cancelnotification_fuzzer/BUILD.gn b/test/fuzztest/cancelnotification_fuzzer/BUILD.gn index a22f265c678aa4e9a9463caf5e1727e8f9efbe24..56ff3806b2cfa0b0cae4bbbdcec3affc17cc2fc4 100644 --- a/test/fuzztest/cancelnotification_fuzzer/BUILD.gn +++ b/test/fuzztest/cancelnotification_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("CancelNotificationFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/enabledistributed_fuzzer/BUILD.gn b/test/fuzztest/enabledistributed_fuzzer/BUILD.gn index 9afbaac41b86449d4209c3c1522bce8141bcac18..97f688dbdfe7aadb2a747fab9f387cda2306eda5 100644 --- a/test/fuzztest/enabledistributed_fuzzer/BUILD.gn +++ b/test/fuzztest/enabledistributed_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("EnableDistributedFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/enablednotificationcallbackdata_fuzzer/BUILD.gn b/test/fuzztest/enablednotificationcallbackdata_fuzzer/BUILD.gn index 354fe3dce3f9e0d7cf0adde7c29378128018237f..204b0de99f24c47c175677dd921c5b6b6deeb493 100644 --- a/test/fuzztest/enablednotificationcallbackdata_fuzzer/BUILD.gn +++ b/test/fuzztest/enablednotificationcallbackdata_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("EnabledNotificationCallbackDataFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/getactivenotificationnums_fuzzer/BUILD.gn b/test/fuzztest/getactivenotificationnums_fuzzer/BUILD.gn index ca30f1e01ea0721723e2f02d2b02665b78f3346b..31d6a914339cb45e27cdaad2e50721fb975d1dd4 100644 --- a/test/fuzztest/getactivenotificationnums_fuzzer/BUILD.gn +++ b/test/fuzztest/getactivenotificationnums_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("GetActiveNotificationNumsFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/getallactivenotifications_fuzzer/BUILD.gn b/test/fuzztest/getallactivenotifications_fuzzer/BUILD.gn index 02e1ac41e2332d8e960ec2f9010e4b1d4894cafd..b45a4908f333fcf7bc60892f0d245f24207654dd 100644 --- a/test/fuzztest/getallactivenotifications_fuzzer/BUILD.gn +++ b/test/fuzztest/getallactivenotifications_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("GetAllActiveNotificationsFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/getbundleimportance_fuzzer/BUILD.gn b/test/fuzztest/getbundleimportance_fuzzer/BUILD.gn index 2dcda5735f629d84a14892cba2c60208ccdf3955..ac7173b29a9bb461ae0e7110c7835642a3e033ea 100644 --- a/test/fuzztest/getbundleimportance_fuzzer/BUILD.gn +++ b/test/fuzztest/getbundleimportance_fuzzer/BUILD.gn @@ -9,7 +9,7 @@ # 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. +# limitations under the License. #####################hydra-fuzz################### import("//base/notification/distributed_notification_service/notification.gni") @@ -40,7 +40,7 @@ ohos_fuzztest("GetBundleImportanceFuzzTest") { external_deps = [ "ability_base:want", "ability_base:zuri", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn b/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn index bad353a75151de88b40fdb368f5bf2c6a285c2a4..afb69d488e6716bb8573a6c856408121c66b5354 100644 --- a/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn +++ b/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("GetNotificationSlotFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn b/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn index a136ed6583f42973ec48d731485edd204e2ada31..ebc9dcff974c797ef020783462ed50d96b49f6c2 100644 --- a/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn +++ b/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("GetNotificationSlotNumAsBundleFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/getnotificationslotsforbundle_fuzzer/BUILD.gn b/test/fuzztest/getnotificationslotsforbundle_fuzzer/BUILD.gn index 550181ea6e0254dfa85208447e9cced46d75e32f..0073a8782811688306d0760135e5511aff222660 100644 --- a/test/fuzztest/getnotificationslotsforbundle_fuzzer/BUILD.gn +++ b/test/fuzztest/getnotificationslotsforbundle_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("GetNotificationSlotsForBundleFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/messageuser_fuzzer/BUILD.gn b/test/fuzztest/messageuser_fuzzer/BUILD.gn index 743510799d46c0bd82f32d3b451534a4c2ea8cec..346b3b0f226db4b9dc97c9175ed4c4f378ede473 100644 --- a/test/fuzztest/messageuser_fuzzer/BUILD.gn +++ b/test/fuzztest/messageuser_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("MessageUserFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notification_fuzzer/BUILD.gn b/test/fuzztest/notification_fuzzer/BUILD.gn index 42f5e01251dc2a77bfe17bedc6858e2159975d51..e6bfb2e0b93383df973462666c871e4ea3c7ce03 100644 --- a/test/fuzztest/notification_fuzzer/BUILD.gn +++ b/test/fuzztest/notification_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("NotificationFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationactionbutton_fuzzer/BUILD.gn b/test/fuzztest/notificationactionbutton_fuzzer/BUILD.gn index 990c9dba24aa350c27cb2e4f3cce8e6dbcdd78f8..debab1a5c170a117c2625e43e75fe109996ebf4b 100644 --- a/test/fuzztest/notificationactionbutton_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationactionbutton_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("NotificationActionButtonFuzzTest") { "ability_base:zuri", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationannex_fuzzer/BUILD.gn b/test/fuzztest/notificationannex_fuzzer/BUILD.gn index 44d67fcb9f5d20108b50cf13cf8172baca00a73b..bec24ddce87863c0c50438acef88857164e33671 100644 --- a/test/fuzztest/notificationannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationannex_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("NotificationAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationbasiccontent_fuzzer/BUILD.gn b/test/fuzztest/notificationbasiccontent_fuzzer/BUILD.gn index 13e4c66349cef2347ca1360903cae61bd1d6e260..ecf8d201191c7297cf422afab424759a3500a1ad 100644 --- a/test/fuzztest/notificationbasiccontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationbasiccontent_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("NotificationBasicContentFuzzTest") { "ability_base:zuri", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationbundleoption_fuzzer/BUILD.gn b/test/fuzztest/notificationbundleoption_fuzzer/BUILD.gn index f28fb32fffb55ebc16db481fe4866558973561b4..9a86e67affd8fa46fb321a76a15397e0c48a8832 100644 --- a/test/fuzztest/notificationbundleoption_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationbundleoption_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("NotificationBundleOptionFuzzTest") { "ability_base:zuri", "ability_runtime:wantagent_innerkits", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationcontent_fuzzer/BUILD.gn b/test/fuzztest/notificationcontent_fuzzer/BUILD.gn index f093ca3f17af0a4ab90cf60e7c55296c214099f0..3d0be1954d0bec9e8ab732de6d40fcc22044aaac 100644 --- a/test/fuzztest/notificationcontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationcontent_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationContentFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationconversationalcontent_fuzzer/BUILD.gn b/test/fuzztest/notificationconversationalcontent_fuzzer/BUILD.gn index bec34b5e456785c58b2c034350c7206d07c8aa6a..c4946596dc5bca19fc42edf5beda483418124dda 100644 --- a/test/fuzztest/notificationconversationalcontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationconversationalcontent_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationConversationalContentFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationconversationalmessage_fuzzer/BUILD.gn b/test/fuzztest/notificationconversationalmessage_fuzzer/BUILD.gn index d7bbfd8d8f7728180f2363a05cca80e8f71bc4e4..d94cfd2b1d36802bdd4b18588564a71a0f1dd71c 100644 --- a/test/fuzztest/notificationconversationalmessage_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationconversationalmessage_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationConversationalMessageFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationconversationalmessageannex_fuzzer/BUILD.gn b/test/fuzztest/notificationconversationalmessageannex_fuzzer/BUILD.gn index 1a63c08b771f56ea110c3f6462dd1d850622ac58..6afbbf802b0e2cd2c1923265570ef462dc0a0af8 100644 --- a/test/fuzztest/notificationconversationalmessageannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationconversationalmessageannex_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("NotificationConversationalMessageAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationdistributedoptions_fuzzer/BUILD.gn b/test/fuzztest/notificationdistributedoptions_fuzzer/BUILD.gn index 559ffbc70d293d28442a9c0a2cd02489d8262b24..726ba92282903395839988be37a2e2a13a9207eb 100644 --- a/test/fuzztest/notificationdistributedoptions_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationdistributedoptions_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationDistributedOptionsFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationdonotdisturbdate_fuzzer/BUILD.gn b/test/fuzztest/notificationdonotdisturbdate_fuzzer/BUILD.gn index 3e6eb1146d55ba9345ca13d6ce533a98d699dd9d..278522da8d1a44f994c090b80db9bb8a9cdeb86c 100644 --- a/test/fuzztest/notificationdonotdisturbdate_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationdonotdisturbdate_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationDoNotDisturbDateFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationflags_fuzzer/BUILD.gn b/test/fuzztest/notificationflags_fuzzer/BUILD.gn index 447895fb78f92cc5b42d9b4bc0be46895da09ac3..4552feb530063527475039b2663f0955f6b36d95 100644 --- a/test/fuzztest/notificationflags_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationflags_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("NotificationFlagsFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationhelper_fuzzer/BUILD.gn b/test/fuzztest/notificationhelper_fuzzer/BUILD.gn index 608cc9ae5e6dde6d5edf410521fa774418853200..91aec602e59d35e85285c55f7a3ccc688a01bb17 100644 --- a/test/fuzztest/notificationhelper_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationhelper_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("NotificationHelperFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationlongtextcontent_fuzzer/BUILD.gn b/test/fuzztest/notificationlongtextcontent_fuzzer/BUILD.gn index 355cc5b530dbf7ce4eeebb41f9fefdbba86d1b11..6f9b1d8c1b9ac5e265910ab84ca904084386d497 100644 --- a/test/fuzztest/notificationlongtextcontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationlongtextcontent_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationLongTextContentFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationlongtextcontentannex_fuzzer/BUILD.gn b/test/fuzztest/notificationlongtextcontentannex_fuzzer/BUILD.gn index b84ce50d4f2b3ace5743ba89d4830430e0b3f340..5b201de89797b17c97e6b0e2c95dbd300a1a22bd 100644 --- a/test/fuzztest/notificationlongtextcontentannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationlongtextcontentannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationLongTextContentAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationmediacontent_fuzzer/BUILD.gn b/test/fuzztest/notificationmediacontent_fuzzer/BUILD.gn index 88e74fbdaabd2970378f59dd42e705e366ffd184..7dff45c20a80dd71b1fde2e984f01c24c6696fe1 100644 --- a/test/fuzztest/notificationmediacontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationmediacontent_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationMediaContentFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationmultilinecontent_fuzzer/BUILD.gn b/test/fuzztest/notificationmultilinecontent_fuzzer/BUILD.gn index 7d7e7199814f5b60c9ff7294ae9d0656cfd0bd46..d64e4ce63100ca8507a7a75910d71247558d4502 100644 --- a/test/fuzztest/notificationmultilinecontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationmultilinecontent_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationMultiLineContentFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationmultilinecontentannex_fuzzer/BUILD.gn b/test/fuzztest/notificationmultilinecontentannex_fuzzer/BUILD.gn index d18e78d23d9ec80c98e209d4e7f54a81ffa9922c..8518bc8d3cfdd54a477af9f926c23823bbd1b708 100644 --- a/test/fuzztest/notificationmultilinecontentannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationmultilinecontentannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationMultiLineContentAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationnormalcontent_fuzzer/BUILD.gn b/test/fuzztest/notificationnormalcontent_fuzzer/BUILD.gn index dab3a817d475d948ade3b8908731079a108ac5b0..cf19f838ba2aa3b209ab936766d081afd3f4c7eb 100644 --- a/test/fuzztest/notificationnormalcontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationnormalcontent_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationNormalContentFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationpicturecontent_fuzzer/BUILD.gn b/test/fuzztest/notificationpicturecontent_fuzzer/BUILD.gn index 7be6722b299ac8e8fbad7b552da9f361bfffaf39..989bff4990ba9de890b9bbab86331a84be2465a5 100644 --- a/test/fuzztest/notificationpicturecontent_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationpicturecontent_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationPictureContentFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationpicturecontentannex_fuzzer/BUILD.gn b/test/fuzztest/notificationpicturecontentannex_fuzzer/BUILD.gn index 0defda83170f61edc324f324cb43897cabc29f4d..27bd05d8abe4ac0bf3045c11e18d026861ebfceb 100644 --- a/test/fuzztest/notificationpicturecontentannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationpicturecontentannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationPictureContentAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationrequest_fuzzer/BUILD.gn b/test/fuzztest/notificationrequest_fuzzer/BUILD.gn index ce301ebe114e3f0d6389b7b62ac39560709d67a9..8fbe347f049d393d6c4468eb0c40976fd5666f47 100644 --- a/test/fuzztest/notificationrequest_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationrequest_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationRequestFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationrequestannex_fuzzer/BUILD.gn b/test/fuzztest/notificationrequestannex_fuzzer/BUILD.gn index e6dcd86ad3d672e8bce2ce8f3bb8aefaa12d0c28..d86b2c8bac5742713e7439d51f4df25dce8a3b8b 100644 --- a/test/fuzztest/notificationrequestannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationrequestannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationRequestAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationslot_fuzzer/BUILD.gn b/test/fuzztest/notificationslot_fuzzer/BUILD.gn index af8ba11b97a6128fbc8d2c7c009a9ad220371c51..06be62957b595b88b43260962fb7689a30adbe39 100644 --- a/test/fuzztest/notificationslot_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationslot_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("NotificationSlotFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationsorting_fuzzer/BUILD.gn b/test/fuzztest/notificationsorting_fuzzer/BUILD.gn index 24965e38a0b84fa177d2a779dc6bd28c41d199fe..c7799cf8f976e76a595e863cddac47fbf68a17c2 100644 --- a/test/fuzztest/notificationsorting_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationsorting_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationSortingFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationsortingannex_fuzzer/BUILD.gn b/test/fuzztest/notificationsortingannex_fuzzer/BUILD.gn index 396489de57d5bd1e0c83853a049cf46b9b1e7344..66420710b0043c7ac4bfcd7a42da16629353fc80 100644 --- a/test/fuzztest/notificationsortingannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationsortingannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationSortingAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationsortingmap_fuzzer/BUILD.gn b/test/fuzztest/notificationsortingmap_fuzzer/BUILD.gn index 954cf28cc99fa5ada63f0508efdadd7a56a35e7f..b26deda35b4522473ceb4518468e56428b2af0c3 100644 --- a/test/fuzztest/notificationsortingmap_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationsortingmap_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationSortingMapFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationsortingmapannex_fuzzer/BUILD.gn b/test/fuzztest/notificationsortingmapannex_fuzzer/BUILD.gn index f449870f61f795a651e69ee3aee243927828a348..33629b224971aad9f2e5532bb30c2c0da12c2d7f 100644 --- a/test/fuzztest/notificationsortingmapannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationsortingmapannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationSortingMapAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationsubscribeInfo_fuzzer/BUILD.gn b/test/fuzztest/notificationsubscribeInfo_fuzzer/BUILD.gn index 7bb9acd99de7dc554ae9dd9d5ad843fdeeec3948..69784416cfce5e47a7e966637ac5be8c197274f6 100644 --- a/test/fuzztest/notificationsubscribeInfo_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationsubscribeInfo_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationSubscribeInfoFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationtemplate_fuzzer/BUILD.gn b/test/fuzztest/notificationtemplate_fuzzer/BUILD.gn index 0468912b053e861d3df783b7f311c3a999882f86..e7eff35b15e0b310475b419e843c47b5a52e897c 100644 --- a/test/fuzztest/notificationtemplate_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationtemplate_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationTemplateFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationtemplateannex_fuzzer/BUILD.gn b/test/fuzztest/notificationtemplateannex_fuzzer/BUILD.gn index 262ac70cdedfb62dcae287f787b628fef57ac1bb..1285786b16ed86cffbe8db7a26040d6cfaf8bf9e 100644 --- a/test/fuzztest/notificationtemplateannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationtemplateannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationTemplateAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationuserinput_fuzzer/BUILD.gn b/test/fuzztest/notificationuserinput_fuzzer/BUILD.gn index f97967eb06e3618e1177eddb7c02ef818290e90c..66c481dcdd8b132fa65fcc7d1a7624e58ce316f1 100644 --- a/test/fuzztest/notificationuserinput_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationuserinput_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationUserInputFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/notificationuserinputannex_fuzzer/BUILD.gn b/test/fuzztest/notificationuserinputannex_fuzzer/BUILD.gn index db8a5f6fd81f8940a524a9a1d4d6c6ea677b7dce..e76d11b061a2b2b6ab806937dc0960a4bbc1828e 100644 --- a/test/fuzztest/notificationuserinputannex_fuzzer/BUILD.gn +++ b/test/fuzztest/notificationuserinputannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("NotificationUserInputAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/publishcontinuoustasknotification_fuzzer/BUILD.gn b/test/fuzztest/publishcontinuoustasknotification_fuzzer/BUILD.gn index 94edcf0638f988d0ec72ef89a20c7b255c3ffdc6..68a8ac3b3275b7a123bf11fb80be6cf282a3fa0c 100644 --- a/test/fuzztest/publishcontinuoustasknotification_fuzzer/BUILD.gn +++ b/test/fuzztest/publishcontinuoustasknotification_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("PublishContinuousTaskNotificationFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/publishnotification_fuzzer/BUILD.gn b/test/fuzztest/publishnotification_fuzzer/BUILD.gn index 1ee8b4ee91ddd1d660b365bb4508ae06758c74eb..75d36a24244b4dc7ef1e418aeda376c9957ca13f 100644 --- a/test/fuzztest/publishnotification_fuzzer/BUILD.gn +++ b/test/fuzztest/publishnotification_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("PublishNotificationFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/readfromparcel_fuzzer/BUILD.gn b/test/fuzztest/readfromparcel_fuzzer/BUILD.gn index e097b97e0beaf3981aa7779ea4018c1795bab21c..8865b8aff1539976782bc3d0c2182b4f5f598fc8 100644 --- a/test/fuzztest/readfromparcel_fuzzer/BUILD.gn +++ b/test/fuzztest/readfromparcel_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("ReadFromParcelFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderhelper_fuzzer/BUILD.gn b/test/fuzztest/reminderhelper_fuzzer/BUILD.gn index 4402544bb1c63403fa6c6df43fb10443ca094aea..c660ddbaadf37a92e6844cce770ba842ddd26a1c 100644 --- a/test/fuzztest/reminderhelper_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderhelper_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("ReminderHelperFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderrequest_fuzzer/BUILD.gn b/test/fuzztest/reminderrequest_fuzzer/BUILD.gn index 122306ed63f2bb0e25371a58c871fd3d485dc7f6..208b46d0943310c355df34545784aaf3448b7033 100644 --- a/test/fuzztest/reminderrequest_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderrequest_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("ReminderRequestFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderrequestalarm_fuzzer/BUILD.gn b/test/fuzztest/reminderrequestalarm_fuzzer/BUILD.gn index 5648157aaec035e5fcccad7c8e6563ec17bbc7c2..994cbf5fe21e9cd2a9ee7daa6ddffced73070f57 100644 --- a/test/fuzztest/reminderrequestalarm_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderrequestalarm_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("ReminderRequestAlarmFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderrequestannex_fuzzer/BUILD.gn b/test/fuzztest/reminderrequestannex_fuzzer/BUILD.gn index 1e4aae33126c7274ec590f42cce6b840c2558a93..611eff9dc2a805b8796941d0c40ad80e1995ea16 100644 --- a/test/fuzztest/reminderrequestannex_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderrequestannex_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("ReminderRequestAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderrequestannexthree_fuzzer/BUILD.gn b/test/fuzztest/reminderrequestannexthree_fuzzer/BUILD.gn index bea9b9743fbf4b2a297d558da2a2b77ed4999a56..2cafc1c5815b623d384f46d8c08ce10ed8ae07ab 100644 --- a/test/fuzztest/reminderrequestannexthree_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderrequestannexthree_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("ReminderRequestAnnexThreeFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderrequestcalendar_fuzzer/BUILD.gn b/test/fuzztest/reminderrequestcalendar_fuzzer/BUILD.gn index 645f134620e2ec90bffa44af2d08ddbcb8b2a8e4..83ab251459b57dcb8d5e1e9cda884ea8175dce60 100644 --- a/test/fuzztest/reminderrequestcalendar_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderrequestcalendar_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("ReminderRequestCalendarFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderrequestcontinuate_fuzzer/BUILD.gn b/test/fuzztest/reminderrequestcontinuate_fuzzer/BUILD.gn index 434728b57feceb3704b00128bbd572b9e109b3f9..6c9855605286409425a320c95f623472bff66ce8 100644 --- a/test/fuzztest/reminderrequestcontinuate_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderrequestcontinuate_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("ReminderRequestContinuateFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderrequesttimer_fuzzer/BUILD.gn b/test/fuzztest/reminderrequesttimer_fuzzer/BUILD.gn index 3707f52fd553ca82ada6a2f6b611dca327e92901..3c02ba735ea107c914e9bb5e08466c24f019bdcc 100644 --- a/test/fuzztest/reminderrequesttimer_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderrequesttimer_fuzzer/BUILD.gn @@ -42,7 +42,7 @@ ohos_fuzztest("ReminderRequestTimerFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderstore_fuzzer/BUILD.gn b/test/fuzztest/reminderstore_fuzzer/BUILD.gn index b65769865f5627138de0b1753ad9475c61a82e38..98b7f3981343387fab82af2c63dcebef2fd01322 100644 --- a/test/fuzztest/reminderstore_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderstore_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("ReminderStoreFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/reminderstoreannex_fuzzer/BUILD.gn b/test/fuzztest/reminderstoreannex_fuzzer/BUILD.gn index edfc9cfd48a137c368d269c134e59e76860763c6..4334cf9007440ea8f40040ad28721a91dcf549c4 100644 --- a/test/fuzztest/reminderstoreannex_fuzzer/BUILD.gn +++ b/test/fuzztest/reminderstoreannex_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("ReminderStoreAnnexFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/removenotification_fuzzer/BUILD.gn b/test/fuzztest/removenotification_fuzzer/BUILD.gn index 2f30b461fb92a88e285487dcce2f39079622eb90..295e613c6ca396b2318642ad6e319a1c465ee945 100644 --- a/test/fuzztest/removenotification_fuzzer/BUILD.gn +++ b/test/fuzztest/removenotification_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("RemoveNotificationFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/removenotificationsbybundle_fuzzer/BUILD.gn b/test/fuzztest/removenotificationsbybundle_fuzzer/BUILD.gn index 1ae72f56c17781b405192e5281d747adb6607014..2fd958f8a7f0bb24915a39ec51b16e440b30f4c5 100644 --- a/test/fuzztest/removenotificationsbybundle_fuzzer/BUILD.gn +++ b/test/fuzztest/removenotificationsbybundle_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("RemoveNotificationsByBundleFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn b/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn index e8bceb32575933f71e758c117318dd274700528f..6a6e7f290e9794bdc7c897f17e4d7d8b3abe7881 100644 --- a/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn +++ b/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn @@ -41,7 +41,7 @@ ohos_fuzztest("RemoveNotificationSlotFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/setdonotdisturbdate_fuzzer/BUILD.gn b/test/fuzztest/setdonotdisturbdate_fuzzer/BUILD.gn index 4d5705704189dc3d06fa56ff0dd240250fc832a0..aae18fb359672c7daf6d83d93c58d2d3eb1c2e8d 100644 --- a/test/fuzztest/setdonotdisturbdate_fuzzer/BUILD.gn +++ b/test/fuzztest/setdonotdisturbdate_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("SetDoNotDisturbDateFuzzTest") { external_deps = [ "ability_base:want", "ability_base:zuri", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn b/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn index 0654c3f07f2ff39e8387e1f296b12798741d5c0c..e0ba20cc25e03286b8507609998cad2380349d13 100644 --- a/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn +++ b/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("SetNotificationBadgeNumFuzzTest") { external_deps = [ "ability_base:want", "ability_base:zuri", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/setnotificationsenabledforallbundles_fuzzer/BUILD.gn b/test/fuzztest/setnotificationsenabledforallbundles_fuzzer/BUILD.gn index 9a8915f9375dad0c6b3bccc8175c65a35bb668a0..162c12259ad55eeebf73224537ae54d694a015a5 100644 --- a/test/fuzztest/setnotificationsenabledforallbundles_fuzzer/BUILD.gn +++ b/test/fuzztest/setnotificationsenabledforallbundles_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("SetNotificationsEnabledForAllBundlesFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/setprogressbar_fuzzer/BUILD.gn b/test/fuzztest/setprogressbar_fuzzer/BUILD.gn index c22dfc560c0e2e248e4c0303263d2ef94329651c..b01f36c27bb5b013a0d2e02abf717d9142e0b9fb 100644 --- a/test/fuzztest/setprogressbar_fuzzer/BUILD.gn +++ b/test/fuzztest/setprogressbar_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("SetProgressBarFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/fuzztest/settemplate_fuzzer/BUILD.gn b/test/fuzztest/settemplate_fuzzer/BUILD.gn index 831a6a8e1a66d03c1c028ac0cbe308cd2caf6984..07e190e2f703b08a7c4ef616a3ff5d31873d1ade 100644 --- a/test/fuzztest/settemplate_fuzzer/BUILD.gn +++ b/test/fuzztest/settemplate_fuzzer/BUILD.gn @@ -40,7 +40,7 @@ ohos_fuzztest("SetTemplateFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/test/systemtest/acts/ansDump/BUILD.gn b/test/systemtest/acts/ansDump/BUILD.gn index bc26f9fe62d6d293e62a98f1df2cddd5762c3b6e..b84f9e7528e7e656cc0678e1879fd0bc3093e535 100644 --- a/test/systemtest/acts/ansDump/BUILD.gn +++ b/test/systemtest/acts/ansDump/BUILD.gn @@ -38,7 +38,7 @@ ohos_systemtest("AnsDumpTest") { "ability_runtime:wantagent_innerkits", "bundle_framework:appexecfwk_core", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", ] diff --git a/tools/dump/BUILD.gn b/tools/dump/BUILD.gn index c89271252bd57dda23019c41b66846bddf508525..bc1227376c484b4bf42a825783a1ce1461f430ee 100644 --- a/tools/dump/BUILD.gn +++ b/tools/dump/BUILD.gn @@ -52,7 +52,7 @@ ohos_executable("anm") { "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "multimedia_image_framework:image_native", "relational_store:native_rdb", ] diff --git a/tools/test/unittest/dump/BUILD.gn b/tools/test/unittest/dump/BUILD.gn index dab5f124614f9ca4cd7d4a574dd371b1ad2e73f3..36e4b8dba45cc0daa7c6aec9842fabcf80bff9b4 100644 --- a/tools/test/unittest/dump/BUILD.gn +++ b/tools/test/unittest/dump/BUILD.gn @@ -66,7 +66,7 @@ ohos_unittest("notification_shell_command_dump_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", "ipc:ipc_core", "relational_store:native_rdb", ]