From 5e4b64aaa43cbb56be0b86d20f1fbf76dac637cb Mon Sep 17 00:00:00 2001 From: maan4 Date: Fri, 25 Jul 2025 18:10:22 +0800 Subject: [PATCH] change the problem of sync function Signed-off-by: maan4 --- services/hdi_connection/adapter/src/hdi_connection.cpp | 8 ++++---- .../hdi_connection/adapter/src/sensor_event_callback.cpp | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/services/hdi_connection/adapter/src/hdi_connection.cpp b/services/hdi_connection/adapter/src/hdi_connection.cpp index 3443196b..2f377b3f 100644 --- a/services/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/hdi_connection/adapter/src/hdi_connection.cpp @@ -381,16 +381,16 @@ void HdiConnection::Reconnect() SEN_HILOGE("Failed to get an instance of hdi service"); return; } - SensorXcollie registerXcollie("HdiConnection:Reconnect:Register", XCOLLIE_TIMEOUT_5S); - ret = g_sensorInterface->Register(0, g_eventCallback); + SensorXcollie registerXcollie("HdiConnection:Reconnect:RegisterAsync", XCOLLIE_TIMEOUT_5S); + ret = g_sensorInterface->RegisterAsync(0, g_eventCallback); if (ret != 0) { - SEN_HILOGE("Register callback fail"); + SEN_HILOGE("RegisterAsync callback fail"); return; } SensorXcollie regSensorPlugCallBackXcollie("HdiConnection:Reconnect:RegSensorPlugCallBack", XCOLLIE_TIMEOUT_5S); ret = g_sensorInterface->RegSensorPlugCallBack(g_plugCallback); if (ret != 0) { - SEN_HILOGE("Register plug callback fail"); + SEN_HILOGE("RegisterAsync plug callback fail"); return; } std::vector sensorList; diff --git a/services/hdi_connection/adapter/src/sensor_event_callback.cpp b/services/hdi_connection/adapter/src/sensor_event_callback.cpp index 3951ff4a..15b8faec 100644 --- a/services/hdi_connection/adapter/src/sensor_event_callback.cpp +++ b/services/hdi_connection/adapter/src/sensor_event_callback.cpp @@ -54,6 +54,7 @@ void CreatSensorData(SensorData &sensorData, const HdfSensorEvents &event) int32_t SensorEventCallback::OnDataEvent(const HdfSensorEvents &event) { + SEN_HILOGE("Error of Sync function"); return ERR_OK; } -- Gitee