From abcf411408f1da399f67196c68d7ca680fdb9b9e Mon Sep 17 00:00:00 2001 From: Haryslee Date: Mon, 17 Feb 2025 21:24:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=9C=A8=E8=B6=85=E5=87=BA=E5=B1=8F=E5=B9=95?= =?UTF-8?q?=E7=9A=84=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Haryslee --- .../sa/sa_main/first_use_dialog.cpp | 2 +- .../sa/sa_main/sec_comp_info_helper.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/security_component_service/sa/sa_main/first_use_dialog.cpp b/services/security_component_service/sa/sa_main/first_use_dialog.cpp index d06e4c7..b2a06f1 100644 --- a/services/security_component_service/sa/sa_main/first_use_dialog.cpp +++ b/services/security_component_service/sa/sa_main/first_use_dialog.cpp @@ -322,7 +322,7 @@ bool FirstUseDialog::GetDialogInfo(AAFwk::Want& want, const uint64_t displayId, /* crossAxisState is CROSS */ if (crossAxisState == CrossAxisState::STATE_CROSS) { height = info->GetPhysicalHeight(); - offset = info->GetAvailableHeight() / DISPLAY_HALF_RATIO; + offset = static_cast(info->GetAvailableHeight()) / DISPLAY_HALF_RATIO; } SC_LOG_INFO(LABEL, "Display info width %{public}d height %{public}d, dialog offset %{public}d", width, height, offset); 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 98d87b5..9abf59d 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 @@ -136,8 +136,8 @@ bool SecCompInfoHelper::CheckRectValid(const SecCompRect& rect, const SecCompRec return false; } - if (GreatOrEqual((rect.x_ + rect.width_), curScreenWidth) || - GreatOrEqual((rect.y_ + rect.height_), curScreenHeight)) { + if (GreatNotEqual((rect.x_ + rect.width_), curScreenWidth) || + GreatNotEqual((rect.y_ + rect.height_), curScreenHeight)) { SC_LOG_ERROR(LABEL, "SecurityComponentCheckFail: security component is out of screen"); message = OUT_OF_SCREEN + std::to_string(rect.x_) + ", y = " + std::to_string(rect.y_) + ", width = " + std::to_string(rect.width_) + ", height = " + std::to_string(rect.height_) + -- Gitee