From b1e2b4d5820459697acb871d90f2afd0983cbc06 Mon Sep 17 00:00:00 2001 From: XKK Date: Mon, 19 Jun 2023 14:23:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BC=B9=E6=80=A7=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: XKK --- bundle.json | 8 ++- frameworks/ans/BUILD.gn | 4 +- frameworks/ans/test/unittest/BUILD.gn | 4 +- frameworks/core/BUILD.gn | 4 +- .../unittest/ans_image_util_test/BUILD.gn | 2 +- .../unittest/ans_manager_stub_test/BUILD.gn | 2 +- .../unittest/ans_notification_test/BUILD.gn | 2 +- frameworks/js/napi/BUILD.gn | 2 +- frameworks/js/napi/src/manager/BUILD.gn | 2 +- frameworks/js/napi/src/reminder/BUILD.gn | 4 +- frameworks/js/napi/src/subscribe/BUILD.gn | 2 +- notification.gni | 2 +- services/ans/BUILD.gn | 4 +- services/ans/test/unittest/BUILD.gn | 50 +++++++++---------- services/distributed/BUILD.gn | 4 +- services/distributed/test/unittest/BUILD.gn | 42 ++++++++-------- services/test/moduletest/BUILD.gn | 8 +-- .../addnotificationslot_fuzzer/BUILD.gn | 2 +- .../addnotificationslots_fuzzer/BUILD.gn | 2 +- test/fuzztest/addslotbytype_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- test/fuzztest/ansmanagerstub_fuzzer/BUILD.gn | 2 +- .../ansmanagerstubannex_fuzzer/BUILD.gn | 2 +- .../ansmanagerstubannexthree_fuzzer/BUILD.gn | 2 +- .../ansmanagerstubannextwo_fuzzer/BUILD.gn | 2 +- .../anssubscriberproxy_fuzzer/BUILD.gn | 2 +- .../anssubscriberstub_fuzzer/BUILD.gn | 2 +- test/fuzztest/cancelasbundle_fuzzer/BUILD.gn | 2 +- test/fuzztest/cancelgroup_fuzzer/BUILD.gn | 2 +- .../cancelnotification_fuzzer/BUILD.gn | 2 +- .../enabledistributed_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../getactivenotificationnums_fuzzer/BUILD.gn | 2 +- .../getallactivenotifications_fuzzer/BUILD.gn | 2 +- .../getbundleimportance_fuzzer/BUILD.gn | 4 +- .../getnotificationslot_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- test/fuzztest/messageuser_fuzzer/BUILD.gn | 2 +- test/fuzztest/notification_fuzzer/BUILD.gn | 2 +- .../notificationactionbutton_fuzzer/BUILD.gn | 2 +- .../notificationannex_fuzzer/BUILD.gn | 2 +- .../notificationbasiccontent_fuzzer/BUILD.gn | 2 +- .../notificationbundleoption_fuzzer/BUILD.gn | 2 +- .../notificationcontent_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../notificationflags_fuzzer/BUILD.gn | 2 +- .../notificationhelper_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../notificationmediacontent_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../notificationnormalcontent_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../notificationrequest_fuzzer/BUILD.gn | 2 +- .../notificationrequestannex_fuzzer/BUILD.gn | 2 +- .../fuzztest/notificationslot_fuzzer/BUILD.gn | 2 +- .../notificationsorting_fuzzer/BUILD.gn | 2 +- .../notificationsortingannex_fuzzer/BUILD.gn | 2 +- .../notificationsortingmap_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../notificationsubscribeInfo_fuzzer/BUILD.gn | 2 +- .../notificationtemplate_fuzzer/BUILD.gn | 2 +- .../notificationtemplateannex_fuzzer/BUILD.gn | 2 +- .../notificationuserinput_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../publishnotification_fuzzer/BUILD.gn | 2 +- test/fuzztest/readfromparcel_fuzzer/BUILD.gn | 2 +- test/fuzztest/reminderhelper_fuzzer/BUILD.gn | 2 +- test/fuzztest/reminderrequest_fuzzer/BUILD.gn | 2 +- .../reminderrequestalarm_fuzzer/BUILD.gn | 2 +- .../reminderrequestannex_fuzzer/BUILD.gn | 2 +- .../reminderrequestannexthree_fuzzer/BUILD.gn | 2 +- .../reminderrequestcalendar_fuzzer/BUILD.gn | 2 +- .../reminderrequestcontinuate_fuzzer/BUILD.gn | 2 +- .../reminderrequesttimer_fuzzer/BUILD.gn | 2 +- test/fuzztest/reminderstore_fuzzer/BUILD.gn | 2 +- .../reminderstoreannex_fuzzer/BUILD.gn | 2 +- .../removenotification_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- .../removenotificationslot_fuzzer/BUILD.gn | 2 +- .../setdonotdisturbdate_fuzzer/BUILD.gn | 2 +- .../setnotificationbadgenum_fuzzer/BUILD.gn | 2 +- .../BUILD.gn | 2 +- test/fuzztest/setprogressbar_fuzzer/BUILD.gn | 2 +- test/fuzztest/settemplate_fuzzer/BUILD.gn | 2 +- test/systemtest/acts/ansDump/BUILD.gn | 2 +- tools/dump/BUILD.gn | 2 +- tools/test/unittest/dump/BUILD.gn | 2 +- 96 files changed, 152 insertions(+), 154 deletions(-) diff --git a/bundle.json b/bundle.json index 30c43d869..ef3ef9489 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", @@ -70,13 +69,12 @@ "common_event_service", "os_account", "hicollie_native", - "hisysevent_native", + "hisysevent", "access_token", "ipc", "player_framework", "multimedia_image_framework", "eventhandler", - "utils_base", "c_utils", "i18n", "device_manager", diff --git a/frameworks/ans/BUILD.gn b/frameworks/ans/BUILD.gn index 83c528687..bc70ffd54 100644 --- a/frameworks/ans/BUILD.gn +++ b/frameworks/ans/BUILD.gn @@ -77,8 +77,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/frameworks/ans/test/unittest/BUILD.gn b/frameworks/ans/test/unittest/BUILD.gn index ac8f75299..357471218 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 0156e9269..4e347505f 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_native: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 d7d044d41..89534ec4b 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 263e56b33..ee8c99f3d 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 189b3a8c8..edb5dd9dd 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 49766d96a..635ff71a2 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 9ec1cb5e6..eb73cf2f0 100644 --- a/frameworks/js/napi/src/manager/BUILD.gn +++ b/frameworks/js/napi/src/manager/BUILD.gn @@ -81,7 +81,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 69216987b..48a7617bd 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 40ab1f9ec..b5850404c 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/notification.gni b/notification.gni index 3d60e89d5..27b5ba59c 100644 --- a/notification.gni +++ b/notification.gni @@ -39,7 +39,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 13831dc9c..9480393c7 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -72,7 +72,7 @@ ohos_shared_library("libans") { "access_token:libtokenid_sdk", "c_utils:utils", "device_manager:devicemanagersdk", - "hitrace_native:hitrace_meter", + "hitrace:hitrace_meter", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", "os_account:os_account_innerkits", @@ -90,7 +90,7 @@ ohos_shared_library("libans") { if (hisysevent_usage) { cflags += [ "-DHAS_HISYSEVENT_PART" ] - external_deps += [ "hisysevent_native:libhisysevent" ] + external_deps += [ "hisysevent:libhisysevent" ] } subsystem_name = "${subsystem_name}" diff --git a/services/ans/test/unittest/BUILD.gn b/services/ans/test/unittest/BUILD.gn index 929770bf4..c1a46cfd5 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" ] } @@ -155,9 +155,9 @@ 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", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -176,7 +176,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 +215,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 +266,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 +317,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", @@ -382,8 +382,8 @@ ohos_unittest("notification_subscriber_manager_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", @@ -451,8 +451,8 @@ ohos_unittest("advanced_notification_service_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", @@ -502,8 +502,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 +549,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 +602,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 a33510a6f..e95e08296 100644 --- a/services/distributed/BUILD.gn +++ b/services/distributed/BUILD.gn @@ -47,8 +47,8 @@ ohos_shared_library("libans_distributed") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", - "hitrace_native:hitrace_meter", - "hiviewdfx_hilog_native:libhilog", + "hilog:libhilog", + "hitrace:hitrace_meter", "kv_store:distributeddata_inner", ] diff --git a/services/distributed/test/unittest/BUILD.gn b/services/distributed/test/unittest/BUILD.gn index dfc759afe..c57451aef 100644 --- a/services/distributed/test/unittest/BUILD.gn +++ b/services/distributed/test/unittest/BUILD.gn @@ -77,9 +77,9 @@ 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", + "hilog:libhilog", + "hitrace:hitrace_meter", + "hitrace:libhitracechain", "ipc:ipc_core", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", @@ -123,9 +123,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 +169,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 +215,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 +256,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 +294,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 +331,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 +368,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", @@ -409,8 +409,8 @@ ohos_unittest("distributed_notification_manager_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", diff --git a/services/test/moduletest/BUILD.gn b/services/test/moduletest/BUILD.gn index 12b1fee76..27de3f430 100644 --- a/services/test/moduletest/BUILD.gn +++ b/services/test/moduletest/BUILD.gn @@ -75,10 +75,10 @@ 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", + "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/fuzztest/addnotificationslot_fuzzer/BUILD.gn b/test/fuzztest/addnotificationslot_fuzzer/BUILD.gn index 1f26e7738..998e11b82 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 a1d56add3..b0636b1eb 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 1e9646ea4..903b72c4d 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 9d911ff5a..f8cf28689 100644 --- a/test/fuzztest/advancednotificationservice_fuzzer/BUILD.gn +++ b/test/fuzztest/advancednotificationservice_fuzzer/BUILD.gn @@ -53,7 +53,7 @@ ohos_fuzztest("AdvancedNotificationServiceFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", + "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 a4671ff43..a97e173f2 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 7f8a8e82f..96c8a90f2 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 69d0849c6..57b4fd42e 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 ab0e817f3..593424910 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 e9ece1883..742ac8c8e 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 cba93826c..a3d8938b2 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 d57aa11bf..d99a2eb81 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 11eaa77f9..364495e7a 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 a22f265c6..56ff3806b 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 9afbaac41..97f688dbd 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 354fe3dce..204b0de99 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 ca30f1e01..31d6a9143 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 02e1ac41e..b45a4908f 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 2dcda5735..ac7173b29 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 bad353a75..afb69d488 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 a136ed658..ebc9dcff9 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 550181ea6..0073a8782 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 743510799..346b3b0f2 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 42f5e0125..e6bfb2e0b 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 990c9dba2..debab1a5c 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 44d67fcb9..bec24ddce 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 13e4c6634..ecf8d2011 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 f28fb32ff..9a86e67af 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 f093ca3f1..3d0be1954 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 bec34b5e4..c4946596d 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 d7bbfd8d8..d94cfd2b1 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 1a63c08b7..6afbbf802 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 559ffbc70..726ba9228 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 3e6eb1146..278522da8 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 447895fb7..4552feb53 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 608cc9ae5..91aec602e 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 355cc5b53..6f9b1d8c1 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 b84ce50d4..5b201de89 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 88e74fbda..7dff45c20 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 7d7e71998..d64e4ce63 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 d18e78d23..8518bc8d3 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 dab3a817d..cf19f838b 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 7be6722b2..989bff499 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 0defda831..27bd05d8a 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 ce301ebe1..8fbe347f0 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 e6dcd86ad..d86b2c8ba 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 af8ba11b9..06be62957 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 24965e38a..c7799cf8f 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 396489de5..66420710b 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 954cf28cc..b26deda35 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 f449870f6..33629b224 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 7bb9acd99..69784416c 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 0468912b0..e7eff35b1 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 262ac70cd..1285786b1 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 f97967eb0..66c481dcd 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 db8a5f6fd..e76d11b06 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 94edcf063..68a8ac3b3 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 1ee8b4ee9..75d36a242 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 e097b97e0..8865b8aff 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 4402544bb..c660ddbaa 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 122306ed6..208b46d09 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 5648157aa..994cbf5fe 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 1e4aae331..611eff9dc 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 bea9b9743..2cafc1c58 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 645f13462..83ab25145 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 434728b57..6c9855605 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 3707f52fd..3c02ba735 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 b65769865..98b7f3981 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 edfc9cfd4..4334cf900 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 2f30b461f..295e613c6 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 1ae72f56c..2fd958f8a 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 e8bceb325..6a6e7f290 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 4d5705704..aae18fb35 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 0654c3f07..e0ba20cc2 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 9a8915f93..162c12259 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 c22dfc560..b01f36c27 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 831a6a8e1..07e190e2f 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 bc26f9fe6..b84f9e752 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 c89271252..bc1227376 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 dab5f1246..36e4b8dba 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", ] -- Gitee From bbb47565716abefb50837f6ac0a9ed093d2692d8 Mon Sep 17 00:00:00 2001 From: XKK Date: Sun, 25 Jun 2023 09:24:56 +0800 Subject: [PATCH 2/2] ffrt Signed-off-by: XKK --- bundle.json | 3 +- frameworks/ans/BUILD.gn | 1 + .../ans/src/push_callback_stub.cpp | 11 - frameworks/js/napi/src/manager/BUILD.gn | 1 - frameworks/test/moduletest/BUILD.gn | 8 + .../inner_api}/push_callback_proxy.h | 6 +- interfaces/inner_api/push_callback_stub.h | 11 - notification.gni | 1 + services/ans/BUILD.gn | 13 +- .../include/advanced_notification_service.h | 15 +- .../include/notification_subscriber_manager.h | 2 + .../ans/src/advanced_notification_service.cpp | 451 ++++++++++++++---- services/ans/src/notification_preferences.cpp | 1 + .../src/notification_subscriber_manager.cpp | 101 ++-- services/ans/test/unittest/BUILD.gn | 6 + services/distributed/BUILD.gn | 6 +- .../distributed_notification_manager.h | 2 + .../src/distributed_notification_manager.cpp | 44 +- services/distributed/test/unittest/BUILD.gn | 12 +- services/test/moduletest/BUILD.gn | 2 + .../notification_services_test/BUILD.gn | 2 + .../BUILD.gn | 2 + 22 files changed, 529 insertions(+), 172 deletions(-) rename {services => frameworks}/ans/src/push_callback_stub.cpp (87%) rename {services/ans/include => interfaces/inner_api}/push_callback_proxy.h (80%) diff --git a/bundle.json b/bundle.json index ef3ef9489..f135c54da 100644 --- a/bundle.json +++ b/bundle.json @@ -78,7 +78,8 @@ "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 bc70ffd54..c553c48b2 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" ] diff --git a/services/ans/src/push_callback_stub.cpp b/frameworks/ans/src/push_callback_stub.cpp similarity index 87% rename from services/ans/src/push_callback_stub.cpp rename to frameworks/ans/src/push_callback_stub.cpp index 7dd795b05..7ad28812f 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" @@ -82,15 +81,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/js/napi/src/manager/BUILD.gn b/frameworks/js/napi/src/manager/BUILD.gn index eb73cf2f0..35a6a47dd 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 = [ diff --git a/frameworks/test/moduletest/BUILD.gn b/frameworks/test/moduletest/BUILD.gn index 79e1e6ec7..88482e57e 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 469f00b0d..1d9dce762 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 4d0de0690..bfe0573be 100644 --- a/interfaces/inner_api/push_callback_stub.h +++ b/interfaces/inner_api/push_callback_stub.h @@ -39,17 +39,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 27b5ba59c..ebf06efc4 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" diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index 9480393c7..d555c14fe 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -25,7 +25,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", @@ -41,7 +44,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", @@ -53,7 +55,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" ] @@ -72,6 +78,7 @@ ohos_shared_library("libans") { "access_token:libtokenid_sdk", "c_utils:utils", "device_manager:devicemanagersdk", + "ffrt:libffrt", "hitrace:hitrace_meter", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", diff --git a/services/ans/include/advanced_notification_service.h b/services/ans/include/advanced_notification_service.h index 9a026db3e..2b5e94daf 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" @@ -839,12 +840,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 83a4ea459..53bae6aa4 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 44575ec87..23a70b50e 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); } @@ -668,7 +677,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); @@ -697,6 +708,8 @@ ErrCode AdvancedNotificationService::CancelAll() result = ERR_OK; })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -751,7 +764,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; @@ -770,6 +785,8 @@ ErrCode AdvancedNotificationService::AddSlots(const std::vectorwait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -783,13 +800,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; } @@ -802,8 +823,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()) && @@ -812,7 +834,9 @@ ErrCode AdvancedNotificationService::GetActiveNotifications(std::vectorwait(handler); + ANS_LOGE("ffrt end!"); + return ERR_OK; } ErrCode AdvancedNotificationService::GetActiveNotificationNums(uint64_t &num) @@ -824,8 +848,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()) && @@ -835,7 +860,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) @@ -869,8 +896,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; } @@ -884,8 +917,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; } @@ -909,7 +948,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; @@ -930,6 +971,8 @@ ErrCode AdvancedNotificationService::Delete(const std::string &key, int32_t remo #endif } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -953,7 +996,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 @@ -981,6 +1026,8 @@ ErrCode AdvancedNotificationService::DeleteByBundle(const sptrwait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -999,7 +1046,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); @@ -1029,6 +1078,8 @@ ErrCode AdvancedNotificationService::DeleteAll() result = ERR_OK; })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1069,13 +1120,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; } @@ -1099,12 +1155,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); @@ -1133,8 +1193,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; } @@ -1158,13 +1224,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; } @@ -1178,13 +1248,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; } @@ -1332,9 +1406,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; } @@ -1348,9 +1426,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; } @@ -1368,8 +1450,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) { @@ -1377,7 +1460,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) @@ -1410,15 +1495,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( @@ -1487,7 +1575,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); @@ -1495,6 +1585,8 @@ ErrCode AdvancedNotificationService::SetNotificationsEnabledForAllBundles(const // Remote device } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1522,7 +1614,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); @@ -1536,7 +1630,9 @@ ErrCode AdvancedNotificationService::SetNotificationsEnabledForSpecialBundle( } else { // Remote revice } - })); + // })); + // notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); SendEnableNotificationHiSysEvent(bundleOption, enabled, result); return result; @@ -1561,10 +1657,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; } @@ -1593,7 +1693,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) { @@ -1604,7 +1709,9 @@ ErrCode AdvancedNotificationService::IsAllowedNotifySelf(const sptrwait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1670,7 +1777,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) { @@ -1681,7 +1792,9 @@ ErrCode AdvancedNotificationService::IsSpecialBundleAllowedNotify( SetNotificationsEnabledForSpecialBundle("", bundleOption, allowed); } } - })); + // })); + //notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1727,7 +1840,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 { @@ -1743,6 +1858,8 @@ ErrCode AdvancedNotificationService::PublishContinuousTaskNotification(const spt sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyConsumed(record->notification, sortingMap); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -1758,7 +1875,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) && @@ -1776,6 +1895,8 @@ ErrCode AdvancedNotificationService::CancelContinuousTaskNotification(const std: NotificationSubscriberManager::GetInstance()->NotifyCanceled(notification, sortingMap, reason); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -2120,7 +2241,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); @@ -2152,6 +2275,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() @@ -2191,12 +2318,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; } @@ -2210,7 +2341,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)) { @@ -2222,6 +2355,8 @@ ErrCode AdvancedNotificationService::AddSlotByType(NotificationConstant::SlotTyp result = NotificationPreferences::GetInstance().AddNotificationSlots(bundleOption, slots); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -2247,7 +2382,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; @@ -2290,6 +2427,8 @@ ErrCode AdvancedNotificationService::RemoveNotification(const sptrwait(handler); + ANS_LOGE("ffrt end!"); SendRemoveHiSysEvent(notificationId, label, bundleOption, result); return result; @@ -2314,7 +2453,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()) { @@ -2346,6 +2487,8 @@ ErrCode AdvancedNotificationService::RemoveAllNotifications(const sptrrequest); } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -2371,13 +2514,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; } @@ -2395,7 +2542,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()) && @@ -2422,6 +2571,8 @@ ErrCode AdvancedNotificationService::CancelGroup(const std::string &groupName) } } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -2449,7 +2600,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()) { @@ -2479,6 +2632,8 @@ ErrCode AdvancedNotificationService::RemoveGroupByBundle( } } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -2622,13 +2777,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; @@ -2650,8 +2809,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; @@ -2686,13 +2851,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; @@ -2716,8 +2885,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; @@ -2753,13 +2928,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; @@ -2780,7 +2959,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; @@ -2936,7 +3118,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; @@ -2989,6 +3173,7 @@ void AdvancedNotificationService::OnDistributedPublish( sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyConsumed(record->notification, sortingMap); })); + ANS_LOGE("ffrt end!"); } void AdvancedNotificationService::OnDistributedUpdate( @@ -3001,7 +3186,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; @@ -3058,13 +3245,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!"); @@ -3104,6 +3294,7 @@ void AdvancedNotificationService::OnDistributedDelete( NotificationSubscriberManager::GetInstance()->NotifyCanceled(notification, sortingMap, reason); } })); + ANS_LOGE("ffrt end!"); } ErrCode AdvancedNotificationService::GetDistributedEnableInApplicationInfo( @@ -3165,10 +3356,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; } @@ -3211,10 +3406,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; } @@ -3232,9 +3431,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; } @@ -3253,7 +3456,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 @@ -3281,6 +3486,8 @@ ErrCode AdvancedNotificationService::DeleteAllByUser(const int32_t &userId) result = ERR_OK; })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3372,12 +3579,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; } @@ -3387,7 +3598,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) { @@ -3408,6 +3621,8 @@ ErrCode AdvancedNotificationService::GetDoNotDisturbDateByUser(const int32_t &us } } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return ERR_OK; } @@ -3417,9 +3632,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; } @@ -3428,9 +3647,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; } @@ -3448,14 +3671,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 @@ -3482,6 +3711,8 @@ void AdvancedNotificationService::OnBundleDataCleared(const sptrwait(handler); + ANS_LOGE("ffrt end!"); } void AdvancedNotificationService::GetDisplayPosition( @@ -3543,7 +3774,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 || @@ -3575,6 +3807,8 @@ ErrCode AdvancedNotificationService::SetEnabledForBundleSlot( PublishSlotChangeCommonEvent(bundle); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); SendEnableNotificationSlotHiSysEvent(bundleOption, slotType, enabled, result); return result; @@ -3600,7 +3834,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) { @@ -3615,6 +3851,8 @@ ErrCode AdvancedNotificationService::GetEnabledForBundleSlot( } enabled = slot->GetEnable(); })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3651,7 +3889,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) { @@ -3666,6 +3906,8 @@ ErrCode AdvancedNotificationService::ShellDump(const std::string &cmd, const std result = ERR_ANS_INVALID_PARAM; } })); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3869,10 +4111,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; @@ -3894,10 +4140,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; @@ -3958,7 +4208,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; @@ -3968,6 +4219,8 @@ ErrCode AdvancedNotificationService::PublishNotificationBySa(const sptr sortingMap = GenerateSortingMap(); NotificationSubscriberManager::GetInstance()->NotifyConsumed(record->notification, sortingMap); }); + notificationSvrQueue_->wait(handler); + ANS_LOGE("ffrt end!"); return result; } @@ -3983,13 +4236,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; } @@ -4037,8 +4290,8 @@ ErrCode AdvancedNotificationService::RegisterPushCallback(const sptrAddDeathRecipient(pushRecipient_); + pushCallBack_ = iface_cast(pushCallback); ANS_LOGD("end"); return ERR_OK; @@ -4088,6 +4341,7 @@ bool AdvancedNotificationService::IsNeedPushCheck(NotificationConstant::SlotType ErrCode AdvancedNotificationService::PushCheck(const sptr &request) { + ANS_LOGD("start."); if (pushCallBack_) { nlohmann::json jsonObject; jsonObject["pkgName"] = request->GetCreatorBundleName(); @@ -4107,7 +4361,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) @@ -4128,5 +4385,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 16ee92cc7..76d4bc62f 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 1b20cb165..a50c3dd80 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 c1a46cfd5..532b432d4 100644 --- a/services/ans/test/unittest/BUILD.gn +++ b/services/ans/test/unittest/BUILD.gn @@ -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,6 +156,7 @@ ohos_unittest("ans_unit_test") { "common_event_service:cesfwk_innerkits", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", + "ffrt:libffrt", "hilog:libhilog", "hitrace:hitrace_meter", "hitrace:libhitracechain", @@ -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,6 +385,7 @@ ohos_unittest("notification_subscriber_manager_branch_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "ffrt:libffrt", "hitrace:hitrace_meter", "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", @@ -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,6 +456,7 @@ ohos_unittest("advanced_notification_service_branch_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "ffrt:libffrt", "hitrace:hitrace_meter", "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", diff --git a/services/distributed/BUILD.gn b/services/distributed/BUILD.gn index e95e08296..5f14517a3 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,6 +50,7 @@ ohos_shared_library("libans_distributed") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", + "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 9d453e155..422aacc7a 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 073060a6c..7e38d94c9 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 c57451aef..83be3b06d 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,6 +80,7 @@ ohos_unittest("ans_distributed_unit_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", + "ffrt:libffrt", "hilog:libhilog", "hitrace:hitrace_meter", "hitrace:libhitracechain", @@ -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,6 +416,7 @@ ohos_unittest("distributed_notification_manager_branch_test") { "c_utils:utils", "device_manager:devicemanagersdk", "eventhandler:libeventhandler", + "ffrt:libffrt", "hitrace:hitrace_meter", "hitrace:libhitracechain", "hiviewdfx_hilog_native:libhilog", diff --git a/services/test/moduletest/BUILD.gn b/services/test/moduletest/BUILD.gn index 27de3f430..326e85ee2 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,6 +76,7 @@ ohos_moduletest("ans_module_test") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", diff --git a/test/bechmarktest/notification_services_test/BUILD.gn b/test/bechmarktest/notification_services_test/BUILD.gn index 2d9f0f5ae..f6331a12a 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/advancednotificationservice_fuzzer/BUILD.gn b/test/fuzztest/advancednotificationservice_fuzzer/BUILD.gn index f8cf28689..d39c5417b 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,6 +54,7 @@ ohos_fuzztest("AdvancedNotificationServiceFuzzTest") { "ability_base:want", "ability_base:zuri", "c_utils:utils", + "ffrt:libffrt", "hilog:libhilog", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", -- Gitee