From e03bb5bd0b95c0de2b533ce945a6b8495716b75e Mon Sep 17 00:00:00 2001 From: 2301_76695984 Date: Mon, 11 Aug 2025 19:03:44 +0800 Subject: [PATCH 1/5] update Signed-off-by: 2301_76695984 --- frameworks/native/src/common_event_support.cpp | 12 ++++++++++++ interfaces/inner_api/common_event_support.h | 6 ++++++ interfaces/kits/napi/support/src/support.cpp | 4 ++++ interfaces/kits/ndk/include/oh_commonevent_support.h | 5 +++++ services/src/common_event_permission_manager.cpp | 3 +++ 5 files changed, 30 insertions(+) diff --git a/frameworks/native/src/common_event_support.cpp b/frameworks/native/src/common_event_support.cpp index 7b0b2011..d2bb83fe 100644 --- a/frameworks/native/src/common_event_support.cpp +++ b/frameworks/native/src/common_event_support.cpp @@ -1588,6 +1588,12 @@ const std::string CommonEventSupport::COMMON_EVENT_CUSTOM_CONFIG_POLICY_UPDATED const std::string CommonEventSupport::COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED = "usual.event.CUSTOM_ROAMING_REGION_UPDATED"; +/** + * Indicates that the device screen capture. + * This is a protected common event that can only be sent by system. + */ + const std::string CommonEventSupport::COMMON_EVENT_SCREEN_CAPTURE = "usual.event.SCREEN_CAPTURE"; + CommonEventSupport::CommonEventSupport() { Init(); @@ -3015,6 +3021,12 @@ void CommonEventSupport::Init() * This is a protected common event that can only be sent by system. */ commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED); + + /** + * Indicates that the device has updated the custom roaming region of device. + * This is a protected common event that can only be sent by system. + */ + commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_CAPTURE); return; } diff --git a/interfaces/inner_api/common_event_support.h b/interfaces/inner_api/common_event_support.h index 2723e9f0..039f6c5c 100644 --- a/interfaces/inner_api/common_event_support.h +++ b/interfaces/inner_api/common_event_support.h @@ -1439,6 +1439,12 @@ public: */ static const std::string COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED; + /** + * Indicates that the device has updated the custom roaming region of device. + * This is a protected common event that can only be sent by system. + */ + static const std::string COMMON_EVENT_CUSTOM_SCREEN_CAPTURE; + public: CommonEventSupport(); diff --git a/interfaces/kits/napi/support/src/support.cpp b/interfaces/kits/napi/support/src/support.cpp index 572629cf..bec0ec63 100644 --- a/interfaces/kits/napi/support/src/support.cpp +++ b/interfaces/kits/napi/support/src/support.cpp @@ -714,6 +714,10 @@ napi_value SupportInit(napi_env env, napi_value exports) obj, EventFwk::CommonEventSupport::COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED, "COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED"); + SetNamedPropertyByStr(env, + obj, + EventFwk::CommonEventSupport::COMMON_EVENT_SCREEN_CAPTURE, + "COMMON_EVENT_SCREEN_CAPTURE"); napi_property_descriptor exportFuncs[] = {DECLARE_NAPI_PROPERTY("Support", obj)}; napi_define_properties(env, exports, sizeof(exportFuncs) / sizeof(*exportFuncs), exportFuncs); diff --git a/interfaces/kits/ndk/include/oh_commonevent_support.h b/interfaces/kits/ndk/include/oh_commonevent_support.h index b8a00bc5..e60ac609 100644 --- a/interfaces/kits/ndk/include/oh_commonevent_support.h +++ b/interfaces/kits/ndk/include/oh_commonevent_support.h @@ -438,6 +438,11 @@ static const char* const COMMON_EVENT_KIOSK_MODE_ON = "usual.event.KIOSK_MODE_ON */ static const char* const COMMON_EVENT_KIOSK_MODE_OFF = "usual.event.KIOSK_MODE_OFF"; +/** + * Indicates that the device has exited kiosk mode. + * This is a protected common event that can only be sent by system. + */ +static const char* const COMMON_EVENT_SCREEN_CAPTURE = "usual.event.SCREEN_CAPTURE"; #ifdef __cplusplus } #endif diff --git a/services/src/common_event_permission_manager.cpp b/services/src/common_event_permission_manager.cpp index 5bfb1987..aff87521 100644 --- a/services/src/common_event_permission_manager.cpp +++ b/services/src/common_event_permission_manager.cpp @@ -181,6 +181,9 @@ static const std::unordered_map SYSTEM_API_COMMON_EVENTS { -- Gitee From d76cf8d7e897c9bc3a9ac51b6af63f476556de78 Mon Sep 17 00:00:00 2001 From: zeng Date: Tue, 12 Aug 2025 09:48:12 +0800 Subject: [PATCH 2/5] update Signed-off-by: zeng --- interfaces/inner_api/common_event_support.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/inner_api/common_event_support.h b/interfaces/inner_api/common_event_support.h index 039f6c5c..3bc128fd 100644 --- a/interfaces/inner_api/common_event_support.h +++ b/interfaces/inner_api/common_event_support.h @@ -1443,7 +1443,7 @@ public: * Indicates that the device has updated the custom roaming region of device. * This is a protected common event that can only be sent by system. */ - static const std::string COMMON_EVENT_CUSTOM_SCREEN_CAPTURE; + static const std::string COMMON_EVENT_SCREEN_CAPTURE; public: CommonEventSupport(); -- Gitee From 5d79a02e1482ac14d180e33db75b2e216f6d59f7 Mon Sep 17 00:00:00 2001 From: zeng Date: Tue, 12 Aug 2025 10:08:43 +0800 Subject: [PATCH 3/5] update Signed-off-by: zeng --- services/src/common_event_permission_manager.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/services/src/common_event_permission_manager.cpp b/services/src/common_event_permission_manager.cpp index aff87521..5bfb1987 100644 --- a/services/src/common_event_permission_manager.cpp +++ b/services/src/common_event_permission_manager.cpp @@ -181,9 +181,6 @@ static const std::unordered_map SYSTEM_API_COMMON_EVENTS { -- Gitee From f92065664a9a5664633ba81c21a5ea53f902c7d5 Mon Sep 17 00:00:00 2001 From: zeng Date: Wed, 13 Aug 2025 10:19:34 +0800 Subject: [PATCH 4/5] update share Signed-off-by: zeng --- frameworks/native/src/common_event_support.cpp | 2 +- interfaces/inner_api/common_event_support.h | 2 +- interfaces/kits/napi/support/src/support.cpp | 4 ++-- interfaces/kits/ndk/include/oh_commonevent_support.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frameworks/native/src/common_event_support.cpp b/frameworks/native/src/common_event_support.cpp index d2bb83fe..d1debfa4 100644 --- a/frameworks/native/src/common_event_support.cpp +++ b/frameworks/native/src/common_event_support.cpp @@ -1592,7 +1592,7 @@ const std::string CommonEventSupport::COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED * Indicates that the device screen capture. * This is a protected common event that can only be sent by system. */ - const std::string CommonEventSupport::COMMON_EVENT_SCREEN_CAPTURE = "usual.event.SCREEN_CAPTURE"; + const std::string CommonEventSupport::COMMON_EVENT_SCREEN_SHARE = "usual.event.SCREEN_SHARE"; CommonEventSupport::CommonEventSupport() { diff --git a/interfaces/inner_api/common_event_support.h b/interfaces/inner_api/common_event_support.h index 3bc128fd..029c35d4 100644 --- a/interfaces/inner_api/common_event_support.h +++ b/interfaces/inner_api/common_event_support.h @@ -1443,7 +1443,7 @@ public: * Indicates that the device has updated the custom roaming region of device. * This is a protected common event that can only be sent by system. */ - static const std::string COMMON_EVENT_SCREEN_CAPTURE; + static const std::string COMMON_EVENT_SCREEN_SHARE; public: CommonEventSupport(); diff --git a/interfaces/kits/napi/support/src/support.cpp b/interfaces/kits/napi/support/src/support.cpp index bec0ec63..b3bda289 100644 --- a/interfaces/kits/napi/support/src/support.cpp +++ b/interfaces/kits/napi/support/src/support.cpp @@ -716,8 +716,8 @@ napi_value SupportInit(napi_env env, napi_value exports) "COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED"); SetNamedPropertyByStr(env, obj, - EventFwk::CommonEventSupport::COMMON_EVENT_SCREEN_CAPTURE, - "COMMON_EVENT_SCREEN_CAPTURE"); + EventFwk::CommonEventSupport::COMMON_EVENT_SCREEN_SHARE, + "COMMON_EVENT_SCREEN_SHARE"); napi_property_descriptor exportFuncs[] = {DECLARE_NAPI_PROPERTY("Support", obj)}; napi_define_properties(env, exports, sizeof(exportFuncs) / sizeof(*exportFuncs), exportFuncs); diff --git a/interfaces/kits/ndk/include/oh_commonevent_support.h b/interfaces/kits/ndk/include/oh_commonevent_support.h index e60ac609..9b149ea5 100644 --- a/interfaces/kits/ndk/include/oh_commonevent_support.h +++ b/interfaces/kits/ndk/include/oh_commonevent_support.h @@ -442,7 +442,7 @@ static const char* const COMMON_EVENT_KIOSK_MODE_OFF = "usual.event.KIOSK_MODE_O * Indicates that the device has exited kiosk mode. * This is a protected common event that can only be sent by system. */ -static const char* const COMMON_EVENT_SCREEN_CAPTURE = "usual.event.SCREEN_CAPTURE"; +static const char* const COMMON_EVENT_SCREEN_SHARE = "usual.event.SCREEN_SHARE"; #ifdef __cplusplus } #endif -- Gitee From 0a60560628bad3d7dacea790cfe1e8ac69e1f20e Mon Sep 17 00:00:00 2001 From: zeng Date: Wed, 13 Aug 2025 15:12:43 +0800 Subject: [PATCH 5/5] update share Signed-off-by: zeng --- frameworks/native/src/common_event_support.cpp | 4 ++-- interfaces/inner_api/common_event_support.h | 2 +- interfaces/kits/ndk/include/oh_commonevent_support.h | 6 ------ services/src/common_event_permission_manager.cpp | 5 +++-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/frameworks/native/src/common_event_support.cpp b/frameworks/native/src/common_event_support.cpp index d1debfa4..55b33f53 100644 --- a/frameworks/native/src/common_event_support.cpp +++ b/frameworks/native/src/common_event_support.cpp @@ -3023,10 +3023,10 @@ void CommonEventSupport::Init() commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED); /** - * Indicates that the device has updated the custom roaming region of device. + * Indicates that the device screen capture. * This is a protected common event that can only be sent by system. */ - commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_CAPTURE); + commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_SHARE); return; } diff --git a/interfaces/inner_api/common_event_support.h b/interfaces/inner_api/common_event_support.h index 029c35d4..5fb0581f 100644 --- a/interfaces/inner_api/common_event_support.h +++ b/interfaces/inner_api/common_event_support.h @@ -1440,7 +1440,7 @@ public: static const std::string COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED; /** - * Indicates that the device has updated the custom roaming region of device. + * Indicates that the screen capture. * This is a protected common event that can only be sent by system. */ static const std::string COMMON_EVENT_SCREEN_SHARE; diff --git a/interfaces/kits/ndk/include/oh_commonevent_support.h b/interfaces/kits/ndk/include/oh_commonevent_support.h index 9b149ea5..45b4a358 100644 --- a/interfaces/kits/ndk/include/oh_commonevent_support.h +++ b/interfaces/kits/ndk/include/oh_commonevent_support.h @@ -437,12 +437,6 @@ static const char* const COMMON_EVENT_KIOSK_MODE_ON = "usual.event.KIOSK_MODE_ON * This is a protected common event that can only be sent by system. */ static const char* const COMMON_EVENT_KIOSK_MODE_OFF = "usual.event.KIOSK_MODE_OFF"; - -/** - * Indicates that the device has exited kiosk mode. - * This is a protected common event that can only be sent by system. - */ -static const char* const COMMON_EVENT_SCREEN_SHARE = "usual.event.SCREEN_SHARE"; #ifdef __cplusplus } #endif diff --git a/services/src/common_event_permission_manager.cpp b/services/src/common_event_permission_manager.cpp index 5bfb1987..8fb1e2a9 100644 --- a/services/src/common_event_permission_manager.cpp +++ b/services/src/common_event_permission_manager.cpp @@ -195,10 +195,11 @@ static const std::unordered_set SYSTEM_API_COMMON_EVENTS { CommonEventSupport::COMMON_EVENT_TRUSTED_RING_CHECKIN, CommonEventSupport::COMMON_EVENT_TRUSTED_RING_CHECKOUT, CommonEventSupport::COMMON_EVENT_TRUSTED_RING_RESET, + CommonEventSupport::COMMON_EVENT_CUSTOM_CONFIG_POLICY_UPDATED, + CommonEventSupport::COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED, CommonEventSupport::COMMON_EVENT_USER_LOCKING, CommonEventSupport::COMMON_EVENT_USER_LOCKED, - CommonEventSupport::COMMON_EVENT_CUSTOM_CONFIG_POLICY_UPDATED, - CommonEventSupport::COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED + CommonEventSupport::COMMON_EVENT_SCREEN_SHARE }; static const std::vector SENSITIVE_COMMON_EVENTS { -- Gitee