!664 解决sensor接口调用时序

Merge pull request !664 from 陈飞飞/master
This commit is contained in:
openharmony_ci 2024-11-01 08:47:38 +00:00 committed by Gitee
commit 8e28ee4c01
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -166,8 +166,6 @@ int32_t SensorAgentProxy::ActivateSensor(int32_t sensorId, const SensorUser *use
return ERROR;
}
int32_t ret = SEN_CLIENT.EnableSensor(sensorId, samplingInterval_, reportInterval_);
samplingInterval_ = -1;
reportInterval_ = -1;
if (ret != 0) {
SEN_HILOGE("Enable sensor failed, ret:%{public}d", ret);
subscribeSet.erase(user);