fix log

Signed-off-by: baoyang <baoyang9@huawei.com>
Change-Id: I34d53db146bdf785955a8b5052f3bffbd4fca4c6
This commit is contained in:
baoyang
2024-10-14 13:12:19 +00:00
parent 9d2175d9cf
commit b040d933fc
2 changed files with 8 additions and 3 deletions
@@ -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;
@@ -44,7 +44,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_);
}
@@ -213,6 +213,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);
}