From 66b364c48a4653454937d93cfd15c2c8af153f61 Mon Sep 17 00:00:00 2001 From: zhoujie0328 Date: Tue, 28 Mar 2023 10:47:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?IssueNo:=E6=96=B0=E5=A2=9E=E6=9A=97?= =?UTF-8?q?=E7=A0=81=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description:新增暗码广播 Sig:SIG_Telephony Feature or Bugfix: Feature Binary Source: No Signed-off-by: zhoujie0328 Change-Id: Iaa6d8a0492bcb9c6f31acfa622e94beee54c416e --- frameworks/native/src/common_event_support.cpp | 9 +++++++++ interfaces/inner_api/common_event_support.h | 6 ++++++ interfaces/kits/js/@ohos.commonEvent.d.ts | 9 ++++++++- interfaces/kits/napi/support/src/support.cpp | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/frameworks/native/src/common_event_support.cpp b/frameworks/native/src/common_event_support.cpp index b51fc8ae..d09dd8e9 100644 --- a/frameworks/native/src/common_event_support.cpp +++ b/frameworks/native/src/common_event_support.cpp @@ -1333,6 +1333,12 @@ const std::string CommonEventSupport::COMMON_EVENT_SCREEN_LOCKED = "usual.event. */ const std::string CommonEventSupport::COMMON_EVENT_SCREEN_UNLOCKED = "usual.event.SCREEN_UNLOCKED"; +/** + * Indicates the action of a common event about special code. + * This is a protected common event that can only be sent by system. + */ +const std::string CommonEventSupport::COMMON_EVENT_SPECIAL_CODE = "common.event.SPECIAL_CODE"; + CommonEventSupport::CommonEventSupport() { Init(); @@ -1664,6 +1670,9 @@ void CommonEventSupport::Init() commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_LOCKED); commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_UNLOCKED); + + commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SPECIAL_CODE); + return; } diff --git a/interfaces/inner_api/common_event_support.h b/interfaces/inner_api/common_event_support.h index 3ceea09f..8dc6d23e 100644 --- a/interfaces/inner_api/common_event_support.h +++ b/interfaces/inner_api/common_event_support.h @@ -1210,6 +1210,12 @@ public: */ static const std::string COMMON_EVENT_SCREEN_UNLOCKED; + /** + * Indicates the action of a common event about special code. + * This is a protected common event that can only be sent by system. + */ + static const std::string COMMON_EVENT_SPECIAL_CODE; + public: CommonEventSupport(); diff --git a/interfaces/kits/js/@ohos.commonEvent.d.ts b/interfaces/kits/js/@ohos.commonEvent.d.ts index b1fe4ed1..7dfcec6b 100644 --- a/interfaces/kits/js/@ohos.commonEvent.d.ts +++ b/interfaces/kits/js/@ohos.commonEvent.d.ts @@ -1120,7 +1120,14 @@ declare namespace commonEvent { * To subscribe to this protected common event that can only be sent by system. * @since 10 */ - COMMON_EVENT_HTTP_PROXY_CHANGE = "usual.event.HTTP_PROXY_CHANGE" + COMMON_EVENT_HTTP_PROXY_CHANGE = "usual.event.HTTP_PROXY_CHANGE", + + /** + * Indicates the action of a common event about special code. + * This is a protected common event that can only be sent by system. + * @since 10 + */ + COMMON_EVENT_SPECIAL_CODE = "usual.event.SPECIAL_CODE" } } diff --git a/interfaces/kits/napi/support/src/support.cpp b/interfaces/kits/napi/support/src/support.cpp index c44fc4d2..2e1c9794 100644 --- a/interfaces/kits/napi/support/src/support.cpp +++ b/interfaces/kits/napi/support/src/support.cpp @@ -574,6 +574,11 @@ napi_value SupportInit(napi_env env, napi_value exports) obj, EventFwk::CommonEventSupport::COMMON_EVENT_SCREEN_UNLOCKED, "COMMON_EVENT_SCREEN_UNLOCKED"); + SetNamedPropertyByStr(env, + obj, + EventFwk::CommonEventSupport::COMMON_EVENT_SPECIAL_CODE, + "COMMON_EVENT_SPECIAL_CODE"); + napi_property_descriptor exportFuncs[] = {DECLARE_NAPI_PROPERTY("Support", obj)}; napi_define_properties(env, exports, sizeof(exportFuncs) / sizeof(*exportFuncs), exportFuncs); -- Gitee From 67f34db293e383bf4ef5e220b2ee9b6f42f4ddd9 Mon Sep 17 00:00:00 2001 From: zhoujie0328 Date: Mon, 3 Apr 2023 21:36:13 +0800 Subject: [PATCH 2/3] IssueNo:fix review comment Description:fix review comment Sig:SIG_Telephony Feature or Bugfix: Feature Binary Source: No Signed-off-by: zhoujie0328 Change-Id: Ieca7eb8945c219a1e64ef9b45df7331121dba247 --- interfaces/kits/js/@ohos.commonEvent.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/interfaces/kits/js/@ohos.commonEvent.d.ts b/interfaces/kits/js/@ohos.commonEvent.d.ts index 7dfcec6b..29b00d39 100644 --- a/interfaces/kits/js/@ohos.commonEvent.d.ts +++ b/interfaces/kits/js/@ohos.commonEvent.d.ts @@ -1125,6 +1125,7 @@ declare namespace commonEvent { /** * Indicates the action of a common event about special code. * This is a protected common event that can only be sent by system. + * @systemapi * @since 10 */ COMMON_EVENT_SPECIAL_CODE = "usual.event.SPECIAL_CODE" -- Gitee From fd7923f722017983b303b60263fc760c41de3c8b Mon Sep 17 00:00:00 2001 From: JetGao Date: Fri, 31 Mar 2023 11:00:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?IssueNo:=20=E6=94=AF=E6=8C=81HD=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: 支持HD图标显示 Sig:SIG_Telephony Feature or Bugfix: Feature Binary Source: No Signed-off-by: gaoxb0102 Change-Id: I06a5ffb9957f49d079aa25dc396219ff6847fc31 --- frameworks/native/src/common_event_support.cpp | 9 +++++++++ interfaces/inner_api/common_event_support.h | 6 ++++++ interfaces/kits/js/@ohos.commonEvent.d.ts | 9 ++++++++- interfaces/kits/napi/support/src/support.cpp | 5 ++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/frameworks/native/src/common_event_support.cpp b/frameworks/native/src/common_event_support.cpp index d09dd8e9..d0450721 100644 --- a/frameworks/native/src/common_event_support.cpp +++ b/frameworks/native/src/common_event_support.cpp @@ -1339,6 +1339,13 @@ const std::string CommonEventSupport::COMMON_EVENT_SCREEN_UNLOCKED = "usual.even */ const std::string CommonEventSupport::COMMON_EVENT_SPECIAL_CODE = "common.event.SPECIAL_CODE"; +/** + * Indicates the action of a common event that the call audio quality information has been updated. + * This is a protected common event that can only be sent by system. + */ +const std::string CommonEventSupport::COMMON_EVENT_AUDIO_QUALITY_CHANGE = + "usual.event.AUDIO_QUALITY_CHANGE"; + CommonEventSupport::CommonEventSupport() { Init(); @@ -1673,6 +1680,8 @@ void CommonEventSupport::Init() commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SPECIAL_CODE); + commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_AUDIO_QUALITY_CHANGE); + return; } diff --git a/interfaces/inner_api/common_event_support.h b/interfaces/inner_api/common_event_support.h index 8dc6d23e..997535b8 100644 --- a/interfaces/inner_api/common_event_support.h +++ b/interfaces/inner_api/common_event_support.h @@ -1216,6 +1216,12 @@ public: */ static const std::string COMMON_EVENT_SPECIAL_CODE; + /** + * Indicates the action of a common event that the call audio quality information has been updated. + * This is a protected common event that can only be sent by system. + */ + static const std::string COMMON_EVENT_AUDIO_QUALITY_CHANGE; + public: CommonEventSupport(); diff --git a/interfaces/kits/js/@ohos.commonEvent.d.ts b/interfaces/kits/js/@ohos.commonEvent.d.ts index 29b00d39..fe0e3ddd 100644 --- a/interfaces/kits/js/@ohos.commonEvent.d.ts +++ b/interfaces/kits/js/@ohos.commonEvent.d.ts @@ -1128,7 +1128,14 @@ declare namespace commonEvent { * @systemapi * @since 10 */ - COMMON_EVENT_SPECIAL_CODE = "usual.event.SPECIAL_CODE" + COMMON_EVENT_SPECIAL_CODE = "usual.event.SPECIAL_CODE", + + /** + * Indicates the action of a common event that the call audio quality information has been updated. + * This is a protected common event that can only be sent by system. + * @since 10 + */ + COMMON_EVENT_AUDIO_QUALITY_CHANGE = "usual.event.AUDIO_QUALITY_CHANGE" } } diff --git a/interfaces/kits/napi/support/src/support.cpp b/interfaces/kits/napi/support/src/support.cpp index 2e1c9794..af3059d4 100644 --- a/interfaces/kits/napi/support/src/support.cpp +++ b/interfaces/kits/napi/support/src/support.cpp @@ -578,7 +578,10 @@ napi_value SupportInit(napi_env env, napi_value exports) obj, EventFwk::CommonEventSupport::COMMON_EVENT_SPECIAL_CODE, "COMMON_EVENT_SPECIAL_CODE"); - + SetNamedPropertyByStr(env, + obj, + EventFwk::CommonEventSupport::COMMON_EVENT_AUDIO_QUALITY_CHANGE, + "COMMON_EVENT_AUDIO_QUALITY_CHANGE"); napi_property_descriptor exportFuncs[] = {DECLARE_NAPI_PROPERTY("Support", obj)}; napi_define_properties(env, exports, sizeof(exportFuncs) / sizeof(*exportFuncs), exportFuncs); -- Gitee