From f5f7ce0332e696663ec1c67b754c3554cb94907f Mon Sep 17 00:00:00 2001 From: zouheng <18179045811@163.com> Date: Fri, 29 Aug 2025 10:50:14 +0800 Subject: [PATCH] =?UTF-8?q?ani=5Fon=E6=97=A5=E5=BF=97=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouheng <18179045811@163.com> --- frameworks/ets/ani/src/manager/ani_on.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/frameworks/ets/ani/src/manager/ani_on.cpp b/frameworks/ets/ani/src/manager/ani_on.cpp index 8bbab66b1..952a19d98 100644 --- a/frameworks/ets/ani/src/manager/ani_on.cpp +++ b/frameworks/ets/ani/src/manager/ani_on.cpp @@ -32,7 +32,7 @@ bool CheckCallerIsSystemApp() { auto selfToken = IPCSkeleton::GetSelfTokenID(); if (!Security::AccessToken::TokenIdKit::IsSystemAppByFullTokenID(selfToken)) { - ANS_LOGE("current app is not system app, not allow."); + ANS_LOGE("CheckCallerIsSystemApp current app is not system app, not allow."); return false; } return true; @@ -40,23 +40,23 @@ bool CheckCallerIsSystemApp() ani_int AniOn(ani_env *env, ani_string type, ani_fn_object fn, ani_object checkRequestObj) { - ANS_LOGD("enter"); + ANS_LOGD("AniOn enter"); #ifdef ANS_FEATURE_LIVEVIEW_LOCAL_LIVEVIEW std::string typeStr = ""; ani_status status = OHOS::NotificationSts::GetStringByAniString(env, type, typeStr); if (status != ANI_OK || typeStr.compare(TYPE_STRING)) { - ANS_LOGE("InvalidParam 'type'"); + ANS_LOGE("AniOn InvalidParam 'type'"); int32_t errCode = OHOS::Notification::ERROR_PARAM_INVALID; OHOS::NotificationSts::ThrowStsErrorWithInvalidParam(env); return errCode; } if (OHOS::NotificationSts::IsUndefine(env, checkRequestObj)) { - ANS_LOGI("Old function param, don't need register."); + ANS_LOGI("AniOn Old function param, don't need register."); return ERR_OK; } sptr checkRequest = new NotificationCheckRequest(); if (!OHOS::NotificationSts::UnWarpNotificationCheckRequest(env, checkRequestObj, checkRequest)) { - ANS_LOGE("InvalidParam 'checkRequest'"); + ANS_LOGE("AniOn InvalidParam 'checkRequest'"); int32_t errCode = OHOS::Notification::ERROR_PARAM_INVALID; OHOS::NotificationSts::ThrowStsErrorWithInvalidParam(env); return errCode; @@ -68,7 +68,7 @@ ani_int AniOn(ani_env *env, ani_string type, ani_fn_object fn, ani_object checkR sptr stsPushCallBack_ = new (std::nothrow) StsPushCallBack(env); if (stsPushCallBack_ == nullptr) { - ANS_LOGE("new stsPushCallBack_ failed"); + ANS_LOGE("AniOn new stsPushCallBack_ failed"); OHOS::NotificationSts::ThrowStsErrorWithCode(env, ERROR_INTERNAL_ERROR); return ERROR_INTERNAL_ERROR; } @@ -77,11 +77,11 @@ ani_int AniOn(ani_env *env, ani_string type, ani_fn_object fn, ani_object checkR auto result = NotificationHelper::RegisterPushCallback(stsPushCallBack_->AsObject(), checkRequest); if (result != ERR_OK) { int32_t externalCode = ERR_OK ? ERR_OK : NotificationSts::GetExternalCode(result); - ANS_LOGE("Register failed, result is %{public}d", externalCode); + ANS_LOGE("AniOn Register failed, result is %{public}d", externalCode); OHOS::NotificationSts::ThrowStsErrorWithCode(env, externalCode); return externalCode; } - ANS_LOGD("done"); + ANS_LOGD("AniOn done"); return result; #else int32_t errCode = OHOS::Notification::ERROR_SYSTEM_CAP_ERROR; @@ -92,12 +92,12 @@ ani_int AniOn(ani_env *env, ani_string type, ani_fn_object fn, ani_object checkR ani_int AniOff(ani_env *env, ani_string type, ani_fn_object fn) { - ANS_LOGD("enter"); + ANS_LOGD("AniOff enter"); #ifdef ANS_FEATURE_LIVEVIEW_LOCAL_LIVEVIEW std::string typeStr = ""; ani_status status = OHOS::NotificationSts::GetStringByAniString(env, type, typeStr); if (status != ANI_OK || typeStr.compare(TYPE_STRING)) { - ANS_LOGE("InvalidParam 'type'"); + ANS_LOGE("AniOff InvalidParam 'type'"); int32_t errCode = OHOS::Notification::ERROR_PARAM_INVALID; OHOS::NotificationSts::ThrowStsErrorWithInvalidParam(env); return errCode; @@ -112,7 +112,7 @@ ani_int AniOff(ani_env *env, ani_string type, ani_fn_object fn) return errCode; } int32_t ret = NotificationHelper::UnregisterPushCallback(); - ANS_LOGD("done. ret %{public}d", ret); + ANS_LOGD("AniOff done. ret %{public}d", ret); return ERR_OK; #else int32_t errCode = OHOS::Notification::ERROR_SYSTEM_CAP_ERROR; -- Gitee