diff --git a/interfaces/plugin/src/sensor_js.cpp b/interfaces/plugin/src/sensor_js.cpp index 6ee6d37c584012848896caf994afe23fc90d5090..c3ac9aefe0e32b15791e3c651b1b8c80bae36d1a 100644 --- a/interfaces/plugin/src/sensor_js.cpp +++ b/interfaces/plugin/src/sensor_js.cpp @@ -90,7 +90,9 @@ static bool CheckSystemSubscribe(int32_t sensorTypeId) { std::lock_guard subscribeLock(mutex_); auto iter = g_subscribeCallbacks.find(sensorTypeId); - CHKCF((iter != g_subscribeCallbacks.end()), "No client subscribe"); + if (iter == g_subscribeCallbacks.end()) { + return false; + } return true; } @@ -98,7 +100,9 @@ static void EmitSubscribeCallback(SensorEvent *event) { CHKPV(event); int32_t sensorTypeId = event->sensorTypeId; - CHKCV(CheckSystemSubscribe(sensorTypeId), "No client subscribe"); + if (!CheckSystemSubscribe(sensorTypeId)) { + return; + } std::lock_guard subscribeLock(mutex_); auto callback = g_subscribeCallbacks[sensorTypeId]; CHKCV(copySensorData(callback, event), "Copy sensor data failed"); diff --git a/interfaces/plugin/src/sensor_napi_utils.cpp b/interfaces/plugin/src/sensor_napi_utils.cpp index 3da910bb41f7e63de8b0963af528c87b35c04e6a..ba575d2cd1788d600bd8093ef7c35adc0ed81daf 100644 --- a/interfaces/plugin/src/sensor_napi_utils.cpp +++ b/interfaces/plugin/src/sensor_napi_utils.cpp @@ -483,7 +483,6 @@ void EmitAsyncCallbackWork(sptr asyncCallbackInfo) void freeWork(uv_work_t *work) { - CALL_LOG_ENTER; CHKPV(work); delete work; work = nullptr; diff --git a/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp b/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp index 4cdf260448c0fdb35d062143548af1919c7033ae..04b743fd5ae744ab3f8b60c163bdd09b3c5e2762 100644 --- a/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/sensor/hdi_connection/adapter/src/hdi_connection.cpp @@ -203,7 +203,6 @@ int32_t HdiConnection::RunCommand(int32_t sensorId, int32_t cmd, int32_t params) ZReportDataCb HdiConnection::getReportDataCb() { - CALL_LOG_ENTER; if (reportDataCb_ == nullptr) { SEN_HILOGE("reportDataCb_ cannot be null"); } @@ -212,7 +211,6 @@ ZReportDataCb HdiConnection::getReportDataCb() sptr HdiConnection::getReportDataCallback() { - CALL_LOG_ENTER; if (reportDataCallback_ == nullptr) { SEN_HILOGE("reportDataCallback_ cannot be null"); } diff --git a/services/sensor/src/client_info.cpp b/services/sensor/src/client_info.cpp index e795dda104fb1e7767a8be550052488787537942..ebc4f2bdd5529a5603f8a6b0ca976a48ff025127 100644 --- a/services/sensor/src/client_info.cpp +++ b/services/sensor/src/client_info.cpp @@ -63,7 +63,6 @@ bool ClientInfo::GetSensorState(uint32_t sensorId) SensorBasicInfo ClientInfo::GetBestSensorInfo(uint32_t sensorId) { - CALL_LOG_ENTER; int64_t minSamplingPeriodNs = LLONG_MAX; int64_t minReportDelayNs = LLONG_MAX; SensorBasicInfo sensorInfo; @@ -353,7 +352,6 @@ bool ClientInfo::DestroySensorChannel(int32_t pid) SensorBasicInfo ClientInfo::GetCurPidSensorInfo(uint32_t sensorId, int32_t pid) { - SEN_HILOGD("begin, sensorId : %{public}u", sensorId); int64_t minSamplingPeriodNs = LLONG_MAX; int64_t minReportDelayNs = LLONG_MAX; SensorBasicInfo sensorInfo; @@ -467,7 +465,6 @@ void ClientInfo::StoreEvent(const SensorEvent &event) } for (size_t i = 0; i < sensors.size(); i++) { if ((int32_t)(sensors[i].GetSensorId()) == storedEvent.sensorTypeId) { - SEN_HILOGD("sensorFlags : %{public}u", sensors[i].GetFlags()); foundSensor = true; break; } @@ -657,7 +654,6 @@ std::vector ClientInfo::GetCmdList(uint32_t sensorId, int32_t uid) void ClientInfo::UpdateDataQueue(int32_t sensorId, SensorEvent &event) { - CALL_LOG_ENTER; if (sensorId == HEART_RATE_SENSOR_ID) { return; } diff --git a/services/sensor/src/flush_info_record.cpp b/services/sensor/src/flush_info_record.cpp index fd51ed705d5720e366a22847b07a1ef5efe2aac4..63e716bd7aecafe0ab900b43713989af77f8d8cc 100644 --- a/services/sensor/src/flush_info_record.cpp +++ b/services/sensor/src/flush_info_record.cpp @@ -33,7 +33,6 @@ enum { std::unordered_map> FlushInfoRecord::GetFlushInfo() { - CALL_LOG_ENTER; std::lock_guard flushLock(flushInfoMutex_); return flushInfo_; } @@ -81,7 +80,6 @@ bool FlushInfoRecord::IsFlushChannelValid(const std::vector &flushInfoList, const sptr &channel) { - CALL_LOG_ENTER; for (size_t i = 0; i < flushInfoList.size(); i++) { if (flushInfoList[i].flushChannel == channel) { return i;