diff --git a/services/BUILD.gn b/services/BUILD.gn index 03398e21f8aac10088310746f912fa59bfe28705..d8443602362b1e4bfdd62d80bb83abfb7cd2daa0 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" diff --git a/services/hdi_connection/adapter/include/sensor_event_callback.h b/services/hdi_connection/adapter/include/sensor_event_callback.h index 552e842eaba5dd329f4d9a4af96c5b79ca3c8bad..fee309773fd999e3a1bb76be63d66db6717d9beb 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 9f656f6467d175938bb96b4f7aa856d9f42bbd23..300b1b1fedd2edc3cb4f9bafdcc11765511f7b5c 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);