diff --git a/frameworks/native/src/sensor_agent_proxy.cpp b/frameworks/native/src/sensor_agent_proxy.cpp index 0d0fd18a81cfd9ad92f799cd2c4d956170f4805f..188489b2f8f96dad1a80ca9534f2c59b1c4da759 100644 --- a/frameworks/native/src/sensor_agent_proxy.cpp +++ b/frameworks/native/src/sensor_agent_proxy.cpp @@ -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);