diff --git a/interfaces/plugin/src/sensor_js.cpp b/interfaces/plugin/src/sensor_js.cpp index 263b131d18902a664314a025c2079ca2533b9b30..f759637e6f898f028640d3a31744d8c25ae8e31a 100644 --- a/interfaces/plugin/src/sensor_js.cpp +++ b/interfaces/plugin/src/sensor_js.cpp @@ -69,7 +69,6 @@ static void DataCallbackImpl(SensorEvent *event) } if (g_onceCallbackInfos.find(sensorTypeId) == g_onceCallbackInfos.end()) { - HiLog::Debug(LABEL, "%{public}s no subscribe to the sensor data once", __func__); return; } struct AsyncCallbackInfo *onceCallbackInfo = g_onceCallbackInfos[sensorTypeId]; diff --git a/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp b/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp index a3d95b9d96251f406965d157067b89acc5090809..13b0d0dba45a8c43eef04db5e81f90eb63fa7c35 100644 --- a/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp +++ b/services/sensor/hdi_connection/adapter/src/compatible_connection.cpp @@ -33,6 +33,7 @@ std::mutex ISensorHdiConnection::dataMutex_; std::condition_variable ISensorHdiConnection::dataCondition_; int32_t CompatibleConnection::ConnectHdi() { + HiLog::Info(LABEL, "%{public}s connect hdi success", __func__); return ERR_OK; } diff --git a/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp b/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp index bc9c43ccc4abd5dc51b8d064345583bb2e0abb39..978d5a5e8b3457aeb8b35c44fe0b3ec1560539e3 100644 --- a/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp @@ -98,6 +98,7 @@ int32_t HdiConnection::GetSensorList(std::vector& sensorList) sensor.SetPower(sensorInfos[i].power); sensorList.push_back(sensor); } + HiLog::Debug(LABEL, "%{public}s end", __func__); return ERR_OK; } @@ -158,6 +159,7 @@ int32_t HdiConnection::SetMode(int32_t sensorId, int32_t mode) HiLog::Error(LABEL, "%{public}s is failed", __func__); return ret; } + HiLog::Debug(LABEL, "%{public}s end", __func__); return ERR_OK; } @@ -173,6 +175,7 @@ int32_t HdiConnection::SetOption(int32_t sensorId, int32_t option) HiLog::Error(LABEL, "%{public}s is failed", __func__); return ret; } + HiLog::Debug(LABEL, "%{public}s end", __func__); return ERR_OK; } @@ -190,6 +193,7 @@ int32_t HdiConnection::RegisteDataReport(ZReportDataCb cb, sptr HdiConnection::getReportDataCallback() if (reportDataCallback_ == nullptr) { HiLog::Error(LABEL, "%{public}s reportDataCallback_ cannot be null", __func__); } + HiLog::Debug(LABEL, "%{public}s end", __func__); return reportDataCallback_; } @@ -286,6 +293,7 @@ void HdiConnection::UnregisterHdiDeathRecipient() return; } sensorInterface_->AsObject()->RemoveDeathRecipient(hdiDeathObserver_); + HiLog::Debug(LABEL, "%{public}s end", __func__); } void HdiConnection::ProcessDeathObserver(const wptr &object) @@ -299,6 +307,7 @@ void HdiConnection::ProcessDeathObserver(const wptr &object) hdiService->RemoveDeathRecipient(hdiDeathObserver_); eventCallback_ = nullptr; reconnect(); + HiLog::Debug(LABEL, "%{public}s end", __func__); } void HdiConnection::reconnect() @@ -335,6 +344,7 @@ void HdiConnection::reconnect() HiLog::Error(LABEL, "%{public}s enable sensor fail, sensorTypeId: %{public}d", __func__, sensorTypeId); } } + HiLog::Debug(LABEL, "%{public}s end", __func__); } } // namespace Sensors } // namespace OHOS