diff --git a/frameworks/native/sensor/src/sensor_agent_proxy.cpp b/frameworks/native/sensor/src/sensor_agent_proxy.cpp index e3a1eebe895ca5d0647aaba9f40f5bc2f13e3400..5a769a1b8c9e05f6820d639c85f2476f0d25ea17 100644 --- a/frameworks/native/sensor/src/sensor_agent_proxy.cpp +++ b/frameworks/native/sensor/src/sensor_agent_proxy.cpp @@ -99,8 +99,8 @@ void SensorAgentProxy::HandleSensorData(struct SensorEvent *events, int32_t num, struct SensorEvent eventStream; for (int32_t i = 0; i < num; ++i) { eventStream = events[i]; - if (eventStream.data == nullptr || g_subscribeMap[eventStream.sensorTypeId] == nullptr) { - HiLog::Error(LABEL, "%{public}s data or sensorUser is nullptr", __func__); + if (eventStream.data == nullptr) { + HiLog::Error(LABEL, "%{public}s data is nullptr", __func__); return; } if (g_subscribeMap.find(eventStream.sensorTypeId) == g_subscribeMap.end()) { diff --git a/services/sensor/src/client_info.cpp b/services/sensor/src/client_info.cpp index 19a6a426f6c1dd6b33af54dc4bcab93676246ee6..c39ee3e0730762635d1e5fefce32c51189d7f495 100644 --- a/services/sensor/src/client_info.cpp +++ b/services/sensor/src/client_info.cpp @@ -671,6 +671,7 @@ std::vector ClientInfo::GetCmdList(uint32_t sensorId, int32_t uid) void ClientInfo::UpdateDataQueue(int32_t sensorId, struct SensorEvent &event) { + HiLog::Debug(LABEL, "%{public}s begin", __func__); if (sensorId == HEART_RATE_SENSOR_ID) { return; } diff --git a/services/sensor/src/sensor_data_processer.cpp b/services/sensor/src/sensor_data_processer.cpp index 044b7364b90fe7adfbb12c90ef71680a22b9d838..c5cb664642e08a163d1118c9e5de02ab88a48e56 100644 --- a/services/sensor/src/sensor_data_processer.cpp +++ b/services/sensor/src/sensor_data_processer.cpp @@ -337,9 +337,6 @@ void SensorDataProcesser::EventFilter(struct CircularEventBuf &eventsBuf) } } } else { - if (channelList.empty() || channelList.size() == 0) { - HiLog::Error(LABEL, "%{public}s channelList is empty", __func__); - } for (auto &channel : channelList) { int32_t index = flushInfo_.GetFlushChannelIndex(flushVec, channel); if (index >= 0) {