diff --git a/frameworks/native/src/sensor_service_client.cpp b/frameworks/native/src/sensor_service_client.cpp index e9ac013186cce9b18d279d092563d3e72d4035f3..21243bea7de6f65f83ed0348152f9c9849a563ea 100644 --- a/frameworks/native/src/sensor_service_client.cpp +++ b/frameworks/native/src/sensor_service_client.cpp @@ -114,7 +114,6 @@ bool SensorServiceClient::IsValid(int32_t sensorId) int32_t ret = InitServiceClient(); if (ret != ERR_OK) { SEN_HILOGE("InitServiceClient failed, ret:%{public}d", ret); - return false; } std::lock_guard clientLock(clientMutex_); if (sensorList_.empty()) { @@ -267,7 +266,6 @@ void SensorServiceClient::ProcessDeathObserver(const wptr &object SEN_HILOGI("dataChannel_ is nullptr"); { std::lock_guard clientLock(clientMutex_); - sensorList_.clear(); sensorServer_ = nullptr; } if (InitServiceClient() != ERR_OK) { @@ -280,7 +278,6 @@ void SensorServiceClient::ProcessDeathObserver(const wptr &object dataChannel_->RestoreSensorDataChannel(); { std::lock_guard clientLock(clientMutex_); - sensorList_.clear(); sensorServer_ = nullptr; } if (InitServiceClient() != ERR_OK) {