commit | ebdd3d50568cfeeb42b1ed7fbbb9709804ad034d | [log] [tgz] |
---|---|---|
author | Brian Stack <bstack@google.com> | Fri May 10 17:24:06 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Fri May 10 17:24:06 2019 -0700 |
tree | 719da1aa5cfd3f4c5bab3424051bac30ae1ac085 | |
parent | debaea3b56d4741f9dc8c19dc1b006e968be5c7f [diff] | |
parent | f5a44ae2e0c91ce358e6da96a3fef4ade21099f9 [diff] |
Merge "Mark auto-disabled sensor as not active" into qt-dev am: f5a44ae2e0 Change-Id: I0f4966f697243fb785eed874927efa832e3083e1
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) {