From 181cd07c37314bde29c7d7e31510f2a03827fe88 Mon Sep 17 00:00:00 2001 From: AXYChen Date: Thu, 13 Nov 2025 11:36:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E6=97=B6=E6=80=BB=E6=98=AF=E6=89=93=E5=8D=B0=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=BA=8B=E4=BB=B6=E5=92=8C=E5=BD=93=E5=89=8D=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: AXYChen Change-Id: I6c0d245dfeed09db549b0e794ee771330ec561d5 --- .../sa/sa_main/sec_comp_entity.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 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 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) &&