mirror of
https://github.com/openharmony/security_security_component_manager.git
synced 2026-08-25 12:39:40 -04:00
fix log Signed-off-by: baoyang <baoyang9@huawei.com> Change-Id: I34d53db146bdf785955a8b5052f3bffbd4fca4c6
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user