Skip to content

Commit 16fbe77

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "If the handle does not exist, it should return false" into main
2 parents 4f1e446 + 799a759 commit 16fbe77

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/sensorservice/SensorEventConnection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ bool SensorService::SensorEventConnection::addSensor(int32_t handle) {
173173

174174
bool SensorService::SensorEventConnection::removeSensor(int32_t handle) {
175175
Mutex::Autolock _l(mConnectionLock);
176-
if (mSensorInfo.erase(handle) >= 0) {
176+
if (mSensorInfo.erase(handle) > 0) {
177177
return true;
178178
}
179179
return false;

0 commit comments

Comments
 (0)