From e1b0923d1e52bbdfd0fcc9ed19a8a8af17f7aa1e Mon Sep 17 00:00:00 2001
From: b30033080
Date: Mon, 14 Oct 2024 10:51:52 +0800
Subject: [PATCH] modify log
Change-Id: I7638b02ff21bb719800f822bdf70ad158214ffaa
Signed-off-by: b30033080
---
.../sa/sa_main/sec_comp_entity.cpp | 8 ++++++--
.../sa/sa_main/sec_comp_info_helper.cpp | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/services/security_component_service/sa/sa_main/sec_comp_entity.cpp b/services/security_component_service/sa/sa_main/sec_comp_entity.cpp
index 1894daa..b646c43 100644
--- a/services/security_component_service/sa/sa_main/sec_comp_entity.cpp
+++ b/services/security_component_service/sa/sa_main/sec_comp_entity.cpp
@@ -68,8 +68,12 @@ int32_t SecCompEntity::CheckPointEvent(const SecCompClickEvent& clickInfo) const
}
if (!componentInfo_->rect_.IsInRect(clickInfo.point.touchX, clickInfo.point.touchY)) {
- SC_LOG_ERROR(LABEL, "touch point is not in component rect, %{public}lf, %{public}lf",
- clickInfo.point.touchX, clickInfo.point.touchY);
+ SC_LOG_ERROR(LABEL, "touch point is not in component rect = (%{public}f, %{public}f)" \
+ "left top point of component rect = (%{public}f, %{public}f)" \
+ "right bottom point of component rect = (%{public}f, %{public}f)",
+ clickInfo.point.touchX, clickInfo.point.touchY, componentInfo_->rect_.x_, componentInfo_->rect_.y_
+ componentInfo_->rect_.x_ + componentInfo_->rect_.width,
+ componentInfo_->rect_.y_ + componentInfo_->rect_.height_);
return SC_SERVICE_ERROR_CLICK_EVENT_INVALID;
}
return SC_OK;
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 51c7df2..061bd08 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
@@ -46,7 +46,7 @@ void SecCompInfoHelper::AdjustSecCompRect(SecCompBase* comp, float scale)
comp->rect_.x_ = comp->windowRect_.x_ + (comp->rect_.x_ - comp->windowRect_.x_) * scale;
comp->rect_.y_ = comp->windowRect_.y_ + (comp->rect_.y_ - comp->windowRect_.y_) * scale;
- SC_LOG_DEBUG(LABEL, "After adjust x %{public}lf, y %{public}lf, width %{public}lf, height %{public}lf",
+ SC_LOG_DEBUG(LABEL, "After adjust x %{public}f, y %{public}f, width %{public}f, height %{public}f",
comp->rect_.x_, comp->rect_.y_, comp->rect_.width_, comp->rect_.height_);
}
@@ -226,6 +226,7 @@ bool SecCompInfoHelper::CheckComponentValid(SecCompBase* comp)
}
float scale = WindowInfoHelper::GetWindowScale(comp->windowId_);
+ SC_LOG_DEBUG(LABEL, "WindowScale = %{public}f", scale);
if (!IsEqual(scale, WindowInfoHelper::FULL_SCREEN_SCALE) && !IsEqual(scale, 0.0)) {
AdjustSecCompRect(comp, scale);
}
--
Gitee