From a672cbd1fe0099db14e0d0a172a3bb1e4c44e84b Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Thu, 25 Aug 2022 15:37:50 +0800 Subject: [PATCH] publish picture modify Signed-off-by: fangJinliang1 Change-Id: I6c142929d62bb47a7ef1f1183716ba86566f2fa9 --- frameworks/js/napi/src/common.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frameworks/js/napi/src/common.cpp b/frameworks/js/napi/src/common.cpp index 6f37fe51d..ec7a5be17 100644 --- a/frameworks/js/napi/src/common.cpp +++ b/frameworks/js/napi/src/common.cpp @@ -2951,13 +2951,13 @@ napi_value Common::GetNotificationPictureContentDetailed(const napi_env &env, pictureContent->SetExpandedTitle(str); // picture: image.PixelMap - NAPI_CALL(env, napi_has_named_property(env, contentResult, "picture", &hasProperty)); + /*NAPI_CALL(env, napi_has_named_property(env, contentResult, "picture", &hasProperty)); NAPI_ASSERT(env, hasProperty, "Property picture expected."); napi_get_named_property(env, contentResult, "picture", &pictureContentResult); NAPI_CALL(env, napi_typeof(env, pictureContentResult, &valuetype)); - NAPI_ASSERT(env, valuetype == napi_object, "Wrong argument type. Object expected."); + NAPI_ASSERT(env, valuetype == napi_object, "Wrong argument type. Object expected."); */ std::shared_ptr pixelMap = nullptr; - pixelMap = Media::PixelMapNapi::GetPixelMap(env, pictureContentResult); + pixelMap = Media::PixelMapNapi::GetPixelMap(env, contentResult); if (pixelMap == nullptr) { ANS_LOGE("Invalid object pixelMap"); return nullptr; -- Gitee