From 377d64e4ff73d549d637ca13902c12fd85c3e6fd Mon Sep 17 00:00:00 2001 From: JetGao Date: Fri, 31 Mar 2023 11:00:33 +0800 Subject: [PATCH] =?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 | 10 ++++++++++ interfaces/inner_api/common_event_support.h | 6 ++++++ interfaces/kits/js/@ohos.commonEvent.d.ts | 9 ++++++++- interfaces/kits/napi/support/src/support.cpp | 4 ++++ 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..160df007 100644 --- a/frameworks/native/src/common_event_support.cpp +++ b/frameworks/native/src/common_event_support.cpp @@ -1333,6 +1333,13 @@ 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 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(); @@ -1664,6 +1671,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_AUDIO_QUALITY_CHANGE); + return; } diff --git a/interfaces/inner_api/common_event_support.h b/interfaces/inner_api/common_event_support.h index 3ceea09f..994f259a 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 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 b1fe4ed1..9d52fb50 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 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 c44fc4d2..0287d692 100644 --- a/interfaces/kits/napi/support/src/support.cpp +++ b/interfaces/kits/napi/support/src/support.cpp @@ -574,6 +574,10 @@ 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_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