From cd034f3c2f53aa41334c0586a5172489c04c42f8 Mon Sep 17 00:00:00 2001 From: heguokai Date: Thu, 20 Mar 2025 15:56:45 +0800 Subject: [PATCH 1/4] log change Signed-off-by: heguokai --- frameworks/ans/src/notification_request.cpp | 8 ++++---- frameworks/cj/ffi/src/notification_manager_ffi.cpp | 6 +++--- frameworks/core/src/ans_notification.cpp | 2 +- frameworks/js/napi/src/common_utils.cpp | 4 ++-- frameworks/js/napi/src/subscribe.cpp | 3 +-- frameworks/js/napi/src/subscribe/init_module.cpp | 2 +- services/ans/src/advanced_notification_service.cpp | 6 +++--- .../notification_local_live_view_subscriber_manager.cpp | 2 +- 8 files changed, 16 insertions(+), 17 deletions(-) diff --git a/frameworks/ans/src/notification_request.cpp b/frameworks/ans/src/notification_request.cpp index a7b01c4c9..6f939502e 100644 --- a/frameworks/ans/src/notification_request.cpp +++ b/frameworks/ans/src/notification_request.cpp @@ -236,7 +236,7 @@ void NotificationRequest::SetIsAgentNotification(bool isAgent) void NotificationRequest::AddMessageUser(const std::shared_ptr &messageUser) { if (!messageUser) { - ANS_LOGI("messageUser can not be null"); + ANS_LOGW("messageUser can not be null"); return; } @@ -364,20 +364,20 @@ bool NotificationRequest::IsColorEnabled() const // no valid content if (!notificationContent_) { - ANS_LOGI("no valid notification content"); + ANS_LOGW("no valid notification content"); return false; } // not a media content if (NotificationContent::Type::MEDIA != notificationContentType_) { - ANS_LOGI("not a media notification content"); + ANS_LOGW("not a media notification content"); return false; } auto basicContent = notificationContent_->GetNotificationContent(); auto mediaContent = std::static_pointer_cast(basicContent); if (!mediaContent->GetAVToken()) { - ANS_LOGI("AVToken has not been attached"); + ANS_LOGW("AVToken has not been attached"); return false; } diff --git a/frameworks/cj/ffi/src/notification_manager_ffi.cpp b/frameworks/cj/ffi/src/notification_manager_ffi.cpp index 3975b7876..9d7b91ec1 100644 --- a/frameworks/cj/ffi/src/notification_manager_ffi.cpp +++ b/frameworks/cj/ffi/src/notification_manager_ffi.cpp @@ -147,7 +147,7 @@ RetDataBool FfiOHOSNotificationManagerIsNotificationEnabled() RetDataBool ret = { .code = ERR_INVALID_INSTANCE_CODE, .data = 0 }; auto [status, enabledStatus] = NotificationManagerImpl::IsNotificationEnabled(); if (status != SUCCESS_CODE) { - LOGI("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsNotificationEnabled error"); + LOGW("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsNotificationEnabled error"); ret.code = status; ret.data = false; return ret; @@ -173,7 +173,7 @@ int32_t FfiOHOSNotificationManagerRequestEnableNotificationWithContext(int64_t i { auto context = FFIData::GetData(id); if (context == nullptr) { - LOGI("NOTIFICATION_TEST::FfiOHOSNotificationManagerRequestEnableNotificationWithContext error"); + LOGW("NOTIFICATION_TEST::FfiOHOSNotificationManagerRequestEnableNotificationWithContext error"); return ERROR_PARAM_INVALID; } auto code = NotificationManagerImpl::RequestEnableNotificationWithContext(context); @@ -185,7 +185,7 @@ RetDataBool FfiOHOSNotificationManagerIsDistributedEnabled() RetDataBool ret = { .code = ERR_INVALID_INSTANCE_CODE, .data = 0 }; auto [status, enabledStatus] = NotificationManagerImpl::IsDistributedEnabled(); if (status != SUCCESS_CODE) { - LOGI("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsDistributedEnabled error"); + LOGW("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsDistributedEnabled error"); ret.code = status; ret.data = false; return ret; diff --git a/frameworks/core/src/ans_notification.cpp b/frameworks/core/src/ans_notification.cpp index d48a2998f..cd179ae7c 100644 --- a/frameworks/core/src/ans_notification.cpp +++ b/frameworks/core/src/ans_notification.cpp @@ -294,7 +294,7 @@ ErrCode AnsNotification::CancelNotification(int32_t notificationId) ErrCode AnsNotification::CancelNotification(const std::string &label, int32_t notificationId) { - ANS_LOGI("enter CancelNotification,notificationId:%{public}d", notificationId); + ANS_LOGD("enter CancelNotification,notificationId:%{public}d", notificationId); HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); sptr proxy = GetAnsManagerProxy(); if (!proxy) { diff --git a/frameworks/js/napi/src/common_utils.cpp b/frameworks/js/napi/src/common_utils.cpp index 5bc276db5..50aaa9ee1 100644 --- a/frameworks/js/napi/src/common_utils.cpp +++ b/frameworks/js/napi/src/common_utils.cpp @@ -87,7 +87,7 @@ napi_value Common::NapiGetUndefined(napi_env env) napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, bool newType) { - ANS_LOGI("enter, errorCode[%{public}d]", errCode); + ANS_LOGI("errorCode[%{public}d]", errCode); napi_value error = Common::NapiGetNull(env); if (errCode == ERR_OK && newType) { return error; @@ -108,7 +108,7 @@ napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, bool newType) napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, std::string &msg) { - ANS_LOGI("enter, errorCode[%{public}d]", errCode); + ANS_LOGI("errorCode[%{public}d]", errCode); napi_value error = Common::NapiGetNull(env); if (errCode == ERR_OK) { return error; diff --git a/frameworks/js/napi/src/subscribe.cpp b/frameworks/js/napi/src/subscribe.cpp index 84c31a07b..20ff4cb49 100644 --- a/frameworks/js/napi/src/subscribe.cpp +++ b/frameworks/js/napi/src/subscribe.cpp @@ -379,7 +379,7 @@ void SubscriberInstance::OnConsumed(const std::shared_ptr(data); switch (dataWorkerData->type) { case Type::CANCEL: diff --git a/frameworks/js/napi/src/subscribe/init_module.cpp b/frameworks/js/napi/src/subscribe/init_module.cpp index 20ac78e9f..cdf897820 100644 --- a/frameworks/js/napi/src/subscribe/init_module.cpp +++ b/frameworks/js/napi/src/subscribe/init_module.cpp @@ -27,7 +27,7 @@ EXTERN_C_START napi_value NotificationSubscribeInit(napi_env env, napi_value exports) { - ANS_LOGI("NotificationSubscribeInit start"); + ANS_LOGD("start"); napi_property_descriptor desc[] = { DECLARE_NAPI_FUNCTION("subscribe", NapiSubscribe), diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index c8d6900e9..2e849bbc4 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -649,7 +649,7 @@ ErrCode AdvancedNotificationService::PublishPreparedNotification(const sptr &bundleOption, bool isUpdateByOwner) { HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); - ANS_LOGI("PublishPreparedNotification"); + ANS_LOGD("PublishPreparedNotification"); auto tokenCaller = IPCSkeleton::GetCallingTokenID(); bool isAgentController = AccessTokenHelper::VerifyCallerPermission(tokenCaller, OHOS_PERMISSION_NOTIFICATION_AGENT_CONTROLLER); @@ -762,7 +762,7 @@ void AdvancedNotificationService::QueryDoNotDisturbProfile(const int32_t &userId return; } if (enable != DO_NOT_DISTURB_MODE) { - ANS_LOGI("Currently not is do not disturb mode."); + ANS_LOGD("Currently not is do not disturb mode."); return; } Uri idUri(datashareHelper->GetFocusModeProfileUri(userId)); @@ -2526,7 +2526,7 @@ void AdvancedNotificationService::SetClassificationWithVoip(const sptrSetClassification(""); return; } diff --git a/services/ans/src/notification_local_live_view_subscriber_manager.cpp b/services/ans/src/notification_local_live_view_subscriber_manager.cpp index b895f47fe..9219525ef 100644 --- a/services/ans/src/notification_local_live_view_subscriber_manager.cpp +++ b/services/ans/src/notification_local_live_view_subscriber_manager.cpp @@ -225,7 +225,7 @@ ErrCode NotificationLocalLiveViewSubscriberManager::AddSubscriberInner( record->subscriber->AsObject()->AddDeathRecipient(recipient_); record->subscriber->OnConnected(); - ANS_LOGI("subscriber is connected."); + ANS_LOGD("subscriber is connected."); } return ERR_OK; -- Gitee From 0bdbc507e26281c12a499f51b949d68883150b5b Mon Sep 17 00:00:00 2001 From: heguokai Date: Thu, 20 Mar 2025 16:34:27 +0800 Subject: [PATCH 2/4] change Signed-off-by: heguokai --- frameworks/ans/src/notification_request.cpp | 8 ++++---- frameworks/core/src/ans_notification.cpp | 2 +- frameworks/js/napi/src/common_utils.cpp | 4 ++-- frameworks/js/napi/src/subscribe.cpp | 3 +-- frameworks/js/napi/src/subscribe/init_module.cpp | 2 +- services/ans/src/advanced_notification_service.cpp | 6 +++--- .../notification_local_live_view_subscriber_manager.cpp | 2 +- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/frameworks/ans/src/notification_request.cpp b/frameworks/ans/src/notification_request.cpp index a7b01c4c9..6f939502e 100644 --- a/frameworks/ans/src/notification_request.cpp +++ b/frameworks/ans/src/notification_request.cpp @@ -236,7 +236,7 @@ void NotificationRequest::SetIsAgentNotification(bool isAgent) void NotificationRequest::AddMessageUser(const std::shared_ptr &messageUser) { if (!messageUser) { - ANS_LOGI("messageUser can not be null"); + ANS_LOGW("messageUser can not be null"); return; } @@ -364,20 +364,20 @@ bool NotificationRequest::IsColorEnabled() const // no valid content if (!notificationContent_) { - ANS_LOGI("no valid notification content"); + ANS_LOGW("no valid notification content"); return false; } // not a media content if (NotificationContent::Type::MEDIA != notificationContentType_) { - ANS_LOGI("not a media notification content"); + ANS_LOGW("not a media notification content"); return false; } auto basicContent = notificationContent_->GetNotificationContent(); auto mediaContent = std::static_pointer_cast(basicContent); if (!mediaContent->GetAVToken()) { - ANS_LOGI("AVToken has not been attached"); + ANS_LOGW("AVToken has not been attached"); return false; } diff --git a/frameworks/core/src/ans_notification.cpp b/frameworks/core/src/ans_notification.cpp index d48a2998f..cd179ae7c 100644 --- a/frameworks/core/src/ans_notification.cpp +++ b/frameworks/core/src/ans_notification.cpp @@ -294,7 +294,7 @@ ErrCode AnsNotification::CancelNotification(int32_t notificationId) ErrCode AnsNotification::CancelNotification(const std::string &label, int32_t notificationId) { - ANS_LOGI("enter CancelNotification,notificationId:%{public}d", notificationId); + ANS_LOGD("enter CancelNotification,notificationId:%{public}d", notificationId); HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); sptr proxy = GetAnsManagerProxy(); if (!proxy) { diff --git a/frameworks/js/napi/src/common_utils.cpp b/frameworks/js/napi/src/common_utils.cpp index 5bc276db5..50aaa9ee1 100644 --- a/frameworks/js/napi/src/common_utils.cpp +++ b/frameworks/js/napi/src/common_utils.cpp @@ -87,7 +87,7 @@ napi_value Common::NapiGetUndefined(napi_env env) napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, bool newType) { - ANS_LOGI("enter, errorCode[%{public}d]", errCode); + ANS_LOGI("errorCode[%{public}d]", errCode); napi_value error = Common::NapiGetNull(env); if (errCode == ERR_OK && newType) { return error; @@ -108,7 +108,7 @@ napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, bool newType) napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, std::string &msg) { - ANS_LOGI("enter, errorCode[%{public}d]", errCode); + ANS_LOGI("errorCode[%{public}d]", errCode); napi_value error = Common::NapiGetNull(env); if (errCode == ERR_OK) { return error; diff --git a/frameworks/js/napi/src/subscribe.cpp b/frameworks/js/napi/src/subscribe.cpp index 84c31a07b..20ff4cb49 100644 --- a/frameworks/js/napi/src/subscribe.cpp +++ b/frameworks/js/napi/src/subscribe.cpp @@ -379,7 +379,7 @@ void SubscriberInstance::OnConsumed(const std::shared_ptr(data); switch (dataWorkerData->type) { case Type::CANCEL: diff --git a/frameworks/js/napi/src/subscribe/init_module.cpp b/frameworks/js/napi/src/subscribe/init_module.cpp index 20ac78e9f..cdf897820 100644 --- a/frameworks/js/napi/src/subscribe/init_module.cpp +++ b/frameworks/js/napi/src/subscribe/init_module.cpp @@ -27,7 +27,7 @@ EXTERN_C_START napi_value NotificationSubscribeInit(napi_env env, napi_value exports) { - ANS_LOGI("NotificationSubscribeInit start"); + ANS_LOGD("start"); napi_property_descriptor desc[] = { DECLARE_NAPI_FUNCTION("subscribe", NapiSubscribe), diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index c8d6900e9..2e849bbc4 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -649,7 +649,7 @@ ErrCode AdvancedNotificationService::PublishPreparedNotification(const sptr &bundleOption, bool isUpdateByOwner) { HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); - ANS_LOGI("PublishPreparedNotification"); + ANS_LOGD("PublishPreparedNotification"); auto tokenCaller = IPCSkeleton::GetCallingTokenID(); bool isAgentController = AccessTokenHelper::VerifyCallerPermission(tokenCaller, OHOS_PERMISSION_NOTIFICATION_AGENT_CONTROLLER); @@ -762,7 +762,7 @@ void AdvancedNotificationService::QueryDoNotDisturbProfile(const int32_t &userId return; } if (enable != DO_NOT_DISTURB_MODE) { - ANS_LOGI("Currently not is do not disturb mode."); + ANS_LOGD("Currently not is do not disturb mode."); return; } Uri idUri(datashareHelper->GetFocusModeProfileUri(userId)); @@ -2526,7 +2526,7 @@ void AdvancedNotificationService::SetClassificationWithVoip(const sptrSetClassification(""); return; } diff --git a/services/ans/src/notification_local_live_view_subscriber_manager.cpp b/services/ans/src/notification_local_live_view_subscriber_manager.cpp index b895f47fe..9219525ef 100644 --- a/services/ans/src/notification_local_live_view_subscriber_manager.cpp +++ b/services/ans/src/notification_local_live_view_subscriber_manager.cpp @@ -225,7 +225,7 @@ ErrCode NotificationLocalLiveViewSubscriberManager::AddSubscriberInner( record->subscriber->AsObject()->AddDeathRecipient(recipient_); record->subscriber->OnConnected(); - ANS_LOGI("subscriber is connected."); + ANS_LOGD("subscriber is connected."); } return ERR_OK; -- Gitee From 38131b2736b8149464b24efb4f5bc8be7116560e Mon Sep 17 00:00:00 2001 From: heguokai Date: Thu, 20 Mar 2025 16:39:31 +0800 Subject: [PATCH 3/4] change agin Signed-off-by: heguokai --- frameworks/ans/src/notification_request.cpp | 8 ++++---- frameworks/core/src/ans_notification.cpp | 2 +- frameworks/js/napi/src/common_utils.cpp | 4 ++-- frameworks/js/napi/src/subscribe.cpp | 3 +-- frameworks/js/napi/src/subscribe/init_module.cpp | 2 +- services/ans/src/advanced_notification_service.cpp | 6 +++--- .../notification_local_live_view_subscriber_manager.cpp | 2 +- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/frameworks/ans/src/notification_request.cpp b/frameworks/ans/src/notification_request.cpp index a7b01c4c9..6f939502e 100644 --- a/frameworks/ans/src/notification_request.cpp +++ b/frameworks/ans/src/notification_request.cpp @@ -236,7 +236,7 @@ void NotificationRequest::SetIsAgentNotification(bool isAgent) void NotificationRequest::AddMessageUser(const std::shared_ptr &messageUser) { if (!messageUser) { - ANS_LOGI("messageUser can not be null"); + ANS_LOGW("messageUser can not be null"); return; } @@ -364,20 +364,20 @@ bool NotificationRequest::IsColorEnabled() const // no valid content if (!notificationContent_) { - ANS_LOGI("no valid notification content"); + ANS_LOGW("no valid notification content"); return false; } // not a media content if (NotificationContent::Type::MEDIA != notificationContentType_) { - ANS_LOGI("not a media notification content"); + ANS_LOGW("not a media notification content"); return false; } auto basicContent = notificationContent_->GetNotificationContent(); auto mediaContent = std::static_pointer_cast(basicContent); if (!mediaContent->GetAVToken()) { - ANS_LOGI("AVToken has not been attached"); + ANS_LOGW("AVToken has not been attached"); return false; } diff --git a/frameworks/core/src/ans_notification.cpp b/frameworks/core/src/ans_notification.cpp index d48a2998f..cd179ae7c 100644 --- a/frameworks/core/src/ans_notification.cpp +++ b/frameworks/core/src/ans_notification.cpp @@ -294,7 +294,7 @@ ErrCode AnsNotification::CancelNotification(int32_t notificationId) ErrCode AnsNotification::CancelNotification(const std::string &label, int32_t notificationId) { - ANS_LOGI("enter CancelNotification,notificationId:%{public}d", notificationId); + ANS_LOGD("enter CancelNotification,notificationId:%{public}d", notificationId); HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); sptr proxy = GetAnsManagerProxy(); if (!proxy) { diff --git a/frameworks/js/napi/src/common_utils.cpp b/frameworks/js/napi/src/common_utils.cpp index 5bc276db5..50aaa9ee1 100644 --- a/frameworks/js/napi/src/common_utils.cpp +++ b/frameworks/js/napi/src/common_utils.cpp @@ -87,7 +87,7 @@ napi_value Common::NapiGetUndefined(napi_env env) napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, bool newType) { - ANS_LOGI("enter, errorCode[%{public}d]", errCode); + ANS_LOGI("errorCode[%{public}d]", errCode); napi_value error = Common::NapiGetNull(env); if (errCode == ERR_OK && newType) { return error; @@ -108,7 +108,7 @@ napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, bool newType) napi_value Common::CreateErrorValue(napi_env env, int32_t errCode, std::string &msg) { - ANS_LOGI("enter, errorCode[%{public}d]", errCode); + ANS_LOGI("errorCode[%{public}d]", errCode); napi_value error = Common::NapiGetNull(env); if (errCode == ERR_OK) { return error; diff --git a/frameworks/js/napi/src/subscribe.cpp b/frameworks/js/napi/src/subscribe.cpp index 84c31a07b..20ff4cb49 100644 --- a/frameworks/js/napi/src/subscribe.cpp +++ b/frameworks/js/napi/src/subscribe.cpp @@ -379,7 +379,7 @@ void SubscriberInstance::OnConsumed(const std::shared_ptr(data); switch (dataWorkerData->type) { case Type::CANCEL: diff --git a/frameworks/js/napi/src/subscribe/init_module.cpp b/frameworks/js/napi/src/subscribe/init_module.cpp index 20ac78e9f..cdf897820 100644 --- a/frameworks/js/napi/src/subscribe/init_module.cpp +++ b/frameworks/js/napi/src/subscribe/init_module.cpp @@ -27,7 +27,7 @@ EXTERN_C_START napi_value NotificationSubscribeInit(napi_env env, napi_value exports) { - ANS_LOGI("NotificationSubscribeInit start"); + ANS_LOGD("start"); napi_property_descriptor desc[] = { DECLARE_NAPI_FUNCTION("subscribe", NapiSubscribe), diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index c8d6900e9..2e849bbc4 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -649,7 +649,7 @@ ErrCode AdvancedNotificationService::PublishPreparedNotification(const sptr &bundleOption, bool isUpdateByOwner) { HITRACE_METER_NAME(HITRACE_TAG_NOTIFICATION, __PRETTY_FUNCTION__); - ANS_LOGI("PublishPreparedNotification"); + ANS_LOGD("PublishPreparedNotification"); auto tokenCaller = IPCSkeleton::GetCallingTokenID(); bool isAgentController = AccessTokenHelper::VerifyCallerPermission(tokenCaller, OHOS_PERMISSION_NOTIFICATION_AGENT_CONTROLLER); @@ -762,7 +762,7 @@ void AdvancedNotificationService::QueryDoNotDisturbProfile(const int32_t &userId return; } if (enable != DO_NOT_DISTURB_MODE) { - ANS_LOGI("Currently not is do not disturb mode."); + ANS_LOGD("Currently not is do not disturb mode."); return; } Uri idUri(datashareHelper->GetFocusModeProfileUri(userId)); @@ -2526,7 +2526,7 @@ void AdvancedNotificationService::SetClassificationWithVoip(const sptrSetClassification(""); return; } diff --git a/services/ans/src/notification_local_live_view_subscriber_manager.cpp b/services/ans/src/notification_local_live_view_subscriber_manager.cpp index b895f47fe..9219525ef 100644 --- a/services/ans/src/notification_local_live_view_subscriber_manager.cpp +++ b/services/ans/src/notification_local_live_view_subscriber_manager.cpp @@ -225,7 +225,7 @@ ErrCode NotificationLocalLiveViewSubscriberManager::AddSubscriberInner( record->subscriber->AsObject()->AddDeathRecipient(recipient_); record->subscriber->OnConnected(); - ANS_LOGI("subscriber is connected."); + ANS_LOGD("subscriber is connected."); } return ERR_OK; -- Gitee From 458bfa4bdecf37b0ba40e0545a70a7f6917d875b Mon Sep 17 00:00:00 2001 From: heguokai Date: Thu, 20 Mar 2025 08:42:28 +0000 Subject: [PATCH 4/4] update frameworks/cj/ffi/src/notification_manager_ffi.cpp. Signed-off-by: heguokai --- frameworks/cj/ffi/src/notification_manager_ffi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frameworks/cj/ffi/src/notification_manager_ffi.cpp b/frameworks/cj/ffi/src/notification_manager_ffi.cpp index 9d7b91ec1..3975b7876 100644 --- a/frameworks/cj/ffi/src/notification_manager_ffi.cpp +++ b/frameworks/cj/ffi/src/notification_manager_ffi.cpp @@ -147,7 +147,7 @@ RetDataBool FfiOHOSNotificationManagerIsNotificationEnabled() RetDataBool ret = { .code = ERR_INVALID_INSTANCE_CODE, .data = 0 }; auto [status, enabledStatus] = NotificationManagerImpl::IsNotificationEnabled(); if (status != SUCCESS_CODE) { - LOGW("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsNotificationEnabled error"); + LOGI("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsNotificationEnabled error"); ret.code = status; ret.data = false; return ret; @@ -173,7 +173,7 @@ int32_t FfiOHOSNotificationManagerRequestEnableNotificationWithContext(int64_t i { auto context = FFIData::GetData(id); if (context == nullptr) { - LOGW("NOTIFICATION_TEST::FfiOHOSNotificationManagerRequestEnableNotificationWithContext error"); + LOGI("NOTIFICATION_TEST::FfiOHOSNotificationManagerRequestEnableNotificationWithContext error"); return ERROR_PARAM_INVALID; } auto code = NotificationManagerImpl::RequestEnableNotificationWithContext(context); @@ -185,7 +185,7 @@ RetDataBool FfiOHOSNotificationManagerIsDistributedEnabled() RetDataBool ret = { .code = ERR_INVALID_INSTANCE_CODE, .data = 0 }; auto [status, enabledStatus] = NotificationManagerImpl::IsDistributedEnabled(); if (status != SUCCESS_CODE) { - LOGW("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsDistributedEnabled error"); + LOGI("NOTIFICATION_TEST::FfiOHOSNotificationManagerIsDistributedEnabled error"); ret.code = status; ret.data = false; return ret; -- Gitee