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 6aee04e..e2e0f1b 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 @@ -53,9 +53,10 @@ int32_t SecCompEntity::CheckPointEvent(SecCompClickEvent& clickInfo, int32_t sup { auto current = static_cast( std::chrono::high_resolution_clock::now().time_since_epoch().count()) / TIME_CONVERSION_UNIT; + SC_LOG_INFO(LABEL, "clickInfo timestamp: %{public}llu, current timestamp: %{public}llu", + static_cast(clickInfo.point.timestamp), static_cast(current)); if (clickInfo.point.timestamp < current - MAX_TOUCH_INTERVAL || clickInfo.point.timestamp > current) { - SC_LOG_ERROR(LABEL, "touch timestamp invalid clickInfo. timestamp: %{public}llu, current: %{public}llu", - static_cast(clickInfo.point.timestamp), static_cast(current)); + SC_LOG_ERROR(LABEL, "touch timestamp invalid."); return SC_SERVICE_ERROR_CLICK_EVENT_INVALID; } @@ -81,9 +82,10 @@ int32_t SecCompEntity::CheckKeyEvent(const SecCompClickEvent& clickInfo) const { auto current = static_cast( std::chrono::high_resolution_clock::now().time_since_epoch().count()) / TIME_CONVERSION_UNIT; + SC_LOG_INFO(LABEL, "clickInfo timestamp: %{public}llu, current timestamp: %{public}llu", + static_cast(clickInfo.key.timestamp), static_cast(current)); if (clickInfo.key.timestamp < current - MAX_TOUCH_INTERVAL || clickInfo.key.timestamp > current) { - SC_LOG_ERROR(LABEL, "keyboard timestamp invalid clickInfo. timestamp: %{public}llu, current: %{public}llu", - static_cast(clickInfo.key.timestamp), static_cast(current)); + SC_LOG_ERROR(LABEL, "keyboard timestamp invalid."); return SC_SERVICE_ERROR_CLICK_EVENT_INVALID; } if ((clickInfo.key.keyCode != KEY_SPACE) && (clickInfo.key.keyCode != KEY_ENTER) &&