summaryrefslogtreecommitdiffstats
path: root/services/sensorservice/SensorService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/sensorservice/SensorService.cpp')
-rw-r--r--services/sensorservice/SensorService.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index f953a96..77ada40 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -653,6 +653,7 @@ void SensorService::cleanupConnection(SensorEventConnection* c)
i++;
}
}
+ mLooper->removeFd(c->getSensorChannel()->getSendFd());
mActiveConnections.remove(connection);
BatteryService::cleanup(c->getUid());
if (c->needsWakeLock()) {
@@ -799,6 +800,7 @@ status_t SensorService::cleanupWithoutDisableLocked(
BatteryService::disableSensor(connection->getUid(), handle);
}
if (connection->hasAnySensor() == false) {
+ mLooper->removeFd(connection->getSensorChannel()->getSendFd());
mActiveConnections.remove(connection);
}
// see if this sensor becomes inactive