Merge "Mark auto-disabled sensor as not active" into qt-dev
diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp
index be75c64..fcd4f29 100644
--- a/services/sensorservice/SensorDevice.cpp
+++ b/services/sensorservice/SensorDevice.cpp
@@ -539,6 +539,9 @@
}
Info& info(mActivationCount.editValueAt(activationIndex));
info.removeBatchParamsForIdent(ident);
+ if (info.numActiveClients() == 0) {
+ info.isActive = false;
+ }
}
status_t SensorDevice::activate(void* ident, int handle, int enabled) {