From 10bb3906522e0509a08ee0e27e155f27007cc18e Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Wed, 11 Jan 2023 17:20:56 +0800 Subject: [PATCH] maxScreenWantAgent test Signed-off-by: fangJinliang1 Change-Id: Ib22634d8f5a1c89a4c3e2da88e8b43c7006d176b --- frameworks/ans/src/notification_request.cpp | 2 ++ frameworks/js/napi/src/common.cpp | 2 ++ frameworks/js/napi/src/manager/napi_enable_notification.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/frameworks/ans/src/notification_request.cpp b/frameworks/ans/src/notification_request.cpp index c046ff2af..0825d3f07 100644 --- a/frameworks/ans/src/notification_request.cpp +++ b/frameworks/ans/src/notification_request.cpp @@ -130,11 +130,13 @@ const std::shared_ptr NotificationRequest: void NotificationRequest::SetMaxScreenWantAgent(const std::shared_ptr &wantAgent) { + ANS_LOGI("enter"); maxScreenWantAgent_ = wantAgent; } const std::shared_ptr NotificationRequest::GetMaxScreenWantAgent() const { + ANS_LOGI("enter"); return maxScreenWantAgent_; } diff --git a/frameworks/js/napi/src/common.cpp b/frameworks/js/napi/src/common.cpp index e6fe747c0..908aa85ba 100644 --- a/frameworks/js/napi/src/common.cpp +++ b/frameworks/js/napi/src/common.cpp @@ -531,8 +531,10 @@ napi_value Common::SetNotificationRequestByWantAgent( napi_value wantAgent = nullptr; wantAgent = CreateWantAgentByJS(env, maxScreenAgent); napi_set_named_property(env, result, "maxScreenWantAgent", wantAgent); + ANS_LOGI("has maxScreenWantAgent"); } else { napi_set_named_property(env, result, "maxScreenWantAgent", NapiGetNull(env)); + ANS_LOGI("maxScreenWantAgent is null"); } return NapiGetBoolean(env, true); diff --git a/frameworks/js/napi/src/manager/napi_enable_notification.cpp b/frameworks/js/napi/src/manager/napi_enable_notification.cpp index 9046be8bd..a9976debb 100644 --- a/frameworks/js/napi/src/manager/napi_enable_notification.cpp +++ b/frameworks/js/napi/src/manager/napi_enable_notification.cpp @@ -234,9 +234,11 @@ napi_value NapiRequestEnableNotification(napi_env env, napi_callback_info info) ANS_LOGI("RequestEnableNotification napi_create_async_work start"); AsyncCallbackInfoIsEnable *asynccallbackinfo = static_cast(data); if (asynccallbackinfo) { + ANS_LOGI("RequestEnableNotification asynccallbackinfo start"); std::string deviceId {""}; auto *callbackInfo = static_cast(data); if (CreateCallbackStubImpl(callbackInfo)) { + ANS_LOGI("RequestEnableNotification CreateCallbackStubImpl start"); asynccallbackinfo->info.errorCode = NotificationHelper::RequestEnableNotification(deviceId, callbackStubImpl_); } -- Gitee