From 5f05d0cdfd4cfec259b14813cf48043fd09876af Mon Sep 17 00:00:00 2001 From: zhaoyuan17 Date: Sat, 11 Dec 2021 11:04:06 +0000 Subject: [PATCH] Delete the session notification enumeration in d.ts Signed-off-by: zhaoyuan17 --- interfaces/kits/js/@ohos.notification.d.ts | 5 ----- interfaces/kits/napi/ans/include/common.h | 1 - interfaces/kits/napi/ans/src/common.cpp | 12 ------------ interfaces/kits/napi/ans/src/constant.cpp | 2 -- 4 files changed, 20 deletions(-) diff --git a/interfaces/kits/js/@ohos.notification.d.ts b/interfaces/kits/js/@ohos.notification.d.ts index aed59524f..557c41e74 100644 --- a/interfaces/kits/js/@ohos.notification.d.ts +++ b/interfaces/kits/js/@ohos.notification.d.ts @@ -206,11 +206,6 @@ declare namespace notification { */ NOTIFICATION_CONTENT_PICTURE, - /** - * Conversation notification. - */ - NOTIFICATION_CONTENT_CONVERSATION, - /** * Multi-line text notification. */ diff --git a/interfaces/kits/napi/ans/include/common.h b/interfaces/kits/napi/ans/include/common.h index 94f053a3e..2d4222537 100644 --- a/interfaces/kits/napi/ans/include/common.h +++ b/interfaces/kits/napi/ans/include/common.h @@ -33,7 +33,6 @@ enum class ContentType { NOTIFICATION_CONTENT_BASIC_TEXT, NOTIFICATION_CONTENT_LONG_TEXT, NOTIFICATION_CONTENT_PICTURE, - NOTIFICATION_CONTENT_CONVERSATION, NOTIFICATION_CONTENT_MULTILINE }; diff --git a/interfaces/kits/napi/ans/src/common.cpp b/interfaces/kits/napi/ans/src/common.cpp index 3e67eac60..83861a011 100644 --- a/interfaces/kits/napi/ans/src/common.cpp +++ b/interfaces/kits/napi/ans/src/common.cpp @@ -718,12 +718,6 @@ napi_value Common::SetNotificationContentDetailed(const napi_env &env, const Con if (ret) { napi_set_named_property(env, result, "picture", contentResult); } - } else if (type == ContentType::NOTIFICATION_CONTENT_CONVERSATION) { - // conversation?: NotificationConversationalContent - ret = SetNotificationConversationalContent(env, basicContent.get(), contentResult); - if (ret) { - napi_set_named_property(env, result, "conversation", contentResult); - } } else if (type == ContentType::NOTIFICATION_CONTENT_MULTILINE) { // multiLine?: NotificationMultiLineContent ret = SetNotificationMultiLineContent(env, basicContent.get(), contentResult); @@ -3473,9 +3467,6 @@ bool Common::ContentTypeJSToC(const ContentType &inType, NotificationContent::Ty case ContentType::NOTIFICATION_CONTENT_PICTURE: outType = NotificationContent::Type::PICTURE; break; - case ContentType::NOTIFICATION_CONTENT_CONVERSATION: - outType = NotificationContent::Type::CONVERSATION; - break; default: ANS_LOGE("ContentType %{public}d is an invalid value", inType); return false; @@ -3498,9 +3489,6 @@ bool Common::ContentTypeCToJS(const NotificationContent::Type &inType, ContentTy case NotificationContent::Type::PICTURE: outType = ContentType::NOTIFICATION_CONTENT_PICTURE; break; - case NotificationContent::Type::CONVERSATION: - outType = ContentType::NOTIFICATION_CONTENT_CONVERSATION; - break; default: ANS_LOGE("ContentType %{public}d is an invalid value", inType); return false; diff --git a/interfaces/kits/napi/ans/src/constant.cpp b/interfaces/kits/napi/ans/src/constant.cpp index 96e3e4219..26eb76d27 100644 --- a/interfaces/kits/napi/ans/src/constant.cpp +++ b/interfaces/kits/napi/ans/src/constant.cpp @@ -208,8 +208,6 @@ napi_value ContentTypeInit(napi_env env, napi_value exports) env, obj, (int32_t)ContentType::NOTIFICATION_CONTENT_LONG_TEXT, "NOTIFICATION_CONTENT_LONG_TEXT"); SetNamedPropertyByInteger( env, obj, (int32_t)ContentType::NOTIFICATION_CONTENT_PICTURE, "NOTIFICATION_CONTENT_PICTURE"); - SetNamedPropertyByInteger( - env, obj, (int32_t)ContentType::NOTIFICATION_CONTENT_CONVERSATION, "NOTIFICATION_CONTENT_CONVERSATION"); SetNamedPropertyByInteger( env, obj, (int32_t)ContentType::NOTIFICATION_CONTENT_MULTILINE, "NOTIFICATION_CONTENT_MULTILINE"); -- Gitee