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 1894daa16464eb1d3013c780895effe980eaf4b7..b646c431ebb0538335187848dfeb65264f53eb93 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 51c7df29c3930e3e79887c6631886718e88f7c95..061bd08694d37424ebbc19dc88a34014c2e8216e 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); }