From dfbd75a5cf0791a72af18ecdbaea9cb1e893317a Mon Sep 17 00:00:00 2001 From: bailu1992 Date: Mon, 4 Dec 2023 16:12:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bailu1992 --- .../adapter/include/sensor_event_callback.h | 8 ++++---- .../hdi_connection/adapter/src/hdi_connection.cpp | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/services/hdi_connection/adapter/include/sensor_event_callback.h b/services/hdi_connection/adapter/include/sensor_event_callback.h index 552e842e..96d5375b 100644 --- a/services/hdi_connection/adapter/include/sensor_event_callback.h +++ b/services/hdi_connection/adapter/include/sensor_event_callback.h @@ -16,11 +16,11 @@ #ifndef SENSOR_EVENT_CALLBACK_H #define SENSOR_EVENT_CALLBACK_H -#include "v1_1/isensor_callback.h" -#include "v1_1/sensor_types.h" +#include "v2_0/isensor_callback.h" +#include "v2_0/sensor_types.h" -using OHOS::HDI::Sensor::V1_1::HdfSensorEvents; -using OHOS::HDI::Sensor::V1_1::ISensorCallback; +using OHOS::HDI::Sensor::v2_0::HdfSensorEvents; +using OHOS::HDI::Sensor::v2_0::ISensorCallback; namespace OHOS { namespace Sensors { diff --git a/services/hdi_connection/adapter/src/hdi_connection.cpp b/services/hdi_connection/adapter/src/hdi_connection.cpp index 9f656f64..053ecaa8 100644 --- a/services/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/hdi_connection/adapter/src/hdi_connection.cpp @@ -20,7 +20,7 @@ #include "hisysevent.h" #include "iproxy_broker.h" -#include "v1_1/isensor_interface.h" +#include "v2_0/isensor_interface.h" #include "sensor_agent_type.h" #include "sensor_errors.h" @@ -29,9 +29,9 @@ namespace OHOS { namespace Sensors { using namespace OHOS::HiviewDFX; -using OHOS::HDI::Sensor::V1_1::ISensorInterface; -using OHOS::HDI::Sensor::V1_1::ISensorCallback; -using OHOS::HDI::Sensor::V1_1::HdfSensorInformation; +using OHOS::HDI::Sensor::v2_0::ISensorInterface; +using OHOS::HDI::Sensor::v2_0::ISensorCallback; +using OHOS::HDI::Sensor::v2_0::HdfSensorInformation; namespace { constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "HdiConnection" }; sptr g_sensorInterface = nullptr; @@ -53,7 +53,7 @@ int32_t HdiConnection::ConnectHdi() while (retry < GET_HDI_SERVICE_COUNT) { g_sensorInterface = ISensorInterface::Get(); if (g_sensorInterface != nullptr) { - SEN_HILOGI("Connect v1_1 hdi success"); + SEN_HILOGI("Connect v2_0 hdi success"); g_eventCallback = new (std::nothrow) SensorEventCallback(); CHKPR(g_eventCallback, ERR_NO_INIT); RegisterHdiDeathRecipient(); @@ -65,7 +65,7 @@ int32_t HdiConnection::ConnectHdi() } HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::SENSOR, "HDF_SERVICE_EXCEPTION", HiSysEvent::EventType::FAULT, "PKG_NAME", "ConnectHdi", "ERROR_CODE", CONNECT_SENSOR_HDF_ERR); - SEN_HILOGE("Connect v1_1 hdi failed"); + SEN_HILOGE("Connect v2_0 hdi failed"); return ERR_NO_INIT; } @@ -114,7 +114,7 @@ int32_t HdiConnection::EnableSensor(int32_t sensorId) if (ret != 0) { HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::SENSOR, "HDF_SERVICE_EXCEPTION", HiSysEvent::EventType::FAULT, "PKG_NAME", "EnableSensor", "ERROR_CODE", ret); - SEN_HILOGE("Connect v1_1 hdi failed"); + SEN_HILOGE("Connect v2_0 hdi failed"); return ret; } SetSensorBasicInfoState(sensorId, true); -- Gitee From 79bdb9693fef8db979adfcd8dffc3a4701595b5f Mon Sep 17 00:00:00 2001 From: bailu1992 Date: Tue, 5 Dec 2023 09:48:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=B4=E6=96=87=E4=BB=B6=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bailu1992 --- services/BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/BUILD.gn b/services/BUILD.gn index 03398e21..d8443602 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -87,7 +87,7 @@ ohos_shared_library("libsensor_service") { [ "$SUBSYSTEM_DIR/services/hdi_connection/hardware/include" ] } - external_deps += [ "drivers_interface_sensor:libsensor_proxy_1.1" ] + external_deps += [ "drivers_interface_sensor:libsensor_proxy_2.0" ] } shlib_type = "sa" @@ -169,7 +169,7 @@ ohos_shared_library("libsensor_service_static") { [ "$SUBSYSTEM_DIR/services/hdi_connection/hardware/include" ] } - external_deps += [ "drivers_interface_sensor:libsensor_proxy_1.1" ] + external_deps += [ "drivers_interface_sensor:libsensor_proxy_2.0" ] } part_name = "sensor" -- Gitee From 3df5710d304051c25d9e7711a86c3e25d9c8a68c Mon Sep 17 00:00:00 2001 From: bailu1992 Date: Tue, 5 Dec 2023 15:58:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?sensor=E9=A9=B1=E5=8A=A8=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bailu1992 --- .../adapter/include/sensor_event_callback.h | 4 ++-- .../hdi_connection/adapter/src/hdi_connection.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/hdi_connection/adapter/include/sensor_event_callback.h b/services/hdi_connection/adapter/include/sensor_event_callback.h index 96d5375b..fee30977 100644 --- a/services/hdi_connection/adapter/include/sensor_event_callback.h +++ b/services/hdi_connection/adapter/include/sensor_event_callback.h @@ -19,8 +19,8 @@ #include "v2_0/isensor_callback.h" #include "v2_0/sensor_types.h" -using OHOS::HDI::Sensor::v2_0::HdfSensorEvents; -using OHOS::HDI::Sensor::v2_0::ISensorCallback; +using OHOS::HDI::Sensor::V2_0::HdfSensorEvents; +using OHOS::HDI::Sensor::V2_0::ISensorCallback; namespace OHOS { namespace Sensors { diff --git a/services/hdi_connection/adapter/src/hdi_connection.cpp b/services/hdi_connection/adapter/src/hdi_connection.cpp index 053ecaa8..300b1b1f 100644 --- a/services/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/hdi_connection/adapter/src/hdi_connection.cpp @@ -29,9 +29,9 @@ namespace OHOS { namespace Sensors { using namespace OHOS::HiviewDFX; -using OHOS::HDI::Sensor::v2_0::ISensorInterface; -using OHOS::HDI::Sensor::v2_0::ISensorCallback; -using OHOS::HDI::Sensor::v2_0::HdfSensorInformation; +using OHOS::HDI::Sensor::V2_0::ISensorInterface; +using OHOS::HDI::Sensor::V2_0::ISensorCallback; +using OHOS::HDI::Sensor::V2_0::HdfSensorInformation; namespace { constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "HdiConnection" }; sptr g_sensorInterface = nullptr; @@ -53,7 +53,7 @@ int32_t HdiConnection::ConnectHdi() while (retry < GET_HDI_SERVICE_COUNT) { g_sensorInterface = ISensorInterface::Get(); if (g_sensorInterface != nullptr) { - SEN_HILOGI("Connect v2_0 hdi success"); + SEN_HILOGI("Connect V2_0 hdi success"); g_eventCallback = new (std::nothrow) SensorEventCallback(); CHKPR(g_eventCallback, ERR_NO_INIT); RegisterHdiDeathRecipient(); @@ -65,7 +65,7 @@ int32_t HdiConnection::ConnectHdi() } HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::SENSOR, "HDF_SERVICE_EXCEPTION", HiSysEvent::EventType::FAULT, "PKG_NAME", "ConnectHdi", "ERROR_CODE", CONNECT_SENSOR_HDF_ERR); - SEN_HILOGE("Connect v2_0 hdi failed"); + SEN_HILOGE("Connect V2_0 hdi failed"); return ERR_NO_INIT; } @@ -114,7 +114,7 @@ int32_t HdiConnection::EnableSensor(int32_t sensorId) if (ret != 0) { HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::SENSOR, "HDF_SERVICE_EXCEPTION", HiSysEvent::EventType::FAULT, "PKG_NAME", "EnableSensor", "ERROR_CODE", ret); - SEN_HILOGE("Connect v2_0 hdi failed"); + SEN_HILOGE("Connect V2_0 hdi failed"); return ret; } SetSensorBasicInfoState(sensorId, true); -- Gitee