Merge "fix a typo in SensorService" into jb-mr1-dev
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index 7ab34c9..c9b0f7c 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -462,6 +462,9 @@
                 if (mActiveConnections.indexOf(connection) < 0) {
                     mActiveConnections.add(connection);
                 }
+            } else {
+                ALOGW("sensor %08x already enabled in connection %p (ignoring)",
+                        handle, connection.get());
             }
         }
     }
@@ -567,7 +570,7 @@
 
 bool SensorService::SensorEventConnection::addSensor(int32_t handle) {
     Mutex::Autolock _l(mConnectionLock);
-    if (mSensorInfo.indexOf(handle) <= 0) {
+    if (mSensorInfo.indexOf(handle) < 0) {
         mSensorInfo.add(handle);
         return true;
     }