We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4f1e446 + 799a759 commit 16fbe77Copy full SHA for 16fbe77
1 file changed
services/sensorservice/SensorEventConnection.cpp
@@ -173,7 +173,7 @@ bool SensorService::SensorEventConnection::addSensor(int32_t handle) {
173
174
bool SensorService::SensorEventConnection::removeSensor(int32_t handle) {
175
Mutex::Autolock _l(mConnectionLock);
176
- if (mSensorInfo.erase(handle) >= 0) {
+ if (mSensorInfo.erase(handle) > 0) {
177
return true;
178
}
179
return false;
0 commit comments