From 44ff2d63251a7dca781e274e5e836b7da8825132 Mon Sep 17 00:00:00 2001 From: li-li-wang Date: Thu, 17 Apr 2025 11:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B910%=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: li-li-wang --- .../sa/sa_main/sec_comp_info_helper.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/services/security_component_service/sa/sa_main/sec_comp_info_helper.cpp b/services/security_component_service/sa/sa_main/sec_comp_info_helper.cpp index 44a9285..9a219d3 100644 --- a/services/security_component_service/sa/sa_main/sec_comp_info_helper.cpp +++ b/services/security_component_service/sa/sa_main/sec_comp_info_helper.cpp @@ -31,7 +31,7 @@ namespace Security { namespace SecurityComponent { namespace { constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, SECURITY_DOMAIN_SECURITY_COMPONENT, "SecCompInfoHelper"}; -static constexpr double MAX_RECT_PERCENT = 0.1F; // 10% +static constexpr double MAX_RECT_PERCENT = 0.3F; // 30% static constexpr double ZERO_OFFSET = 0.0F; static std::mutex g_renderLock; } @@ -136,10 +136,9 @@ bool SecCompInfoHelper::CheckRectValid(const SecCompRect& rect, const SecCompRec return false; } - // check rect > 10% + // check rect > 30% if (GreatOrEqual((rect.width_ * rect.height_), (curScreenWidth * curScreenHeight * MAX_RECT_PERCENT))) { - SC_LOG_ERROR(LABEL, "SecurityComponentCheckFail: security component is larger than 10 percent of screen"); - return false; + SC_LOG_INFO(LABEL, "security component is larger than 30 percent of screen"); } SC_LOG_DEBUG(LABEL, "check component rect success."); return true; -- Gitee