diff --git a/frameworks/native/src/sensor_agent_proxy.cpp b/frameworks/native/src/sensor_agent_proxy.cpp index 53b1715ea2632ac5a6b72f362f0080e0f5f30daf..df1d5603cd7628e217827925887abe6230dfd036 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);