summaryrefslogtreecommitdiffstats
path: root/services/sensorservice/SensorInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/sensorservice/SensorInterface.cpp')
-rw-r--r--services/sensorservice/SensorInterface.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/services/sensorservice/SensorInterface.cpp b/services/sensorservice/SensorInterface.cpp
index 93d23d9..be8eaff 100644
--- a/services/sensorservice/SensorInterface.cpp
+++ b/services/sensorservice/SensorInterface.cpp
@@ -32,7 +32,7 @@ SensorInterface::~SensorInterface()
HardwareSensor::HardwareSensor(const sensor_t& sensor)
: mSensorDevice(SensorDevice::getInstance()),
- mSensor(&sensor), mEnabled(false)
+ mSensor(&sensor)
{
LOGI("%s", sensor.name);
}
@@ -46,15 +46,8 @@ bool HardwareSensor::process(sensors_event_t* outEvent,
return true;
}
-bool HardwareSensor::isEnabled() const {
- return mEnabled;
-}
-
-status_t HardwareSensor::activate(void* ident,bool enabled) {
- status_t err = mSensorDevice.activate(ident, mSensor.getHandle(), enabled);
- if (err == NO_ERROR)
- mEnabled = enabled;
- return err;
+status_t HardwareSensor::activate(void* ident, bool enabled) {
+ return mSensorDevice.activate(ident, mSensor.getHandle(), enabled);
}
status_t HardwareSensor::setDelay(void* ident, int handle, int64_t ns) {