From b53d92c3eb9319dbf725b3e59b3c52acfa6d77f0 Mon Sep 17 00:00:00 2001 From: Ethan Chen Date: Thu, 23 Apr 2015 17:27:36 -0700 Subject: [PATCH] sensorservice: Don't replace HAL orientation sensor * Previously HAL orientation sensor would always be replaced if the HAL did not provide a rotation vector sensor as well. Practically no HAL does, so the virtual sensor would always replace it. * Add the virtual sensor only if the HAL does not provide it. Change-Id: I50ad2cd6c60b53eddc4c6854997ec2e3dbff0d1a --- services/sensorservice/SensorService.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index 2d35fe918..9c67be2a9 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -149,10 +149,6 @@ void SensorService::onFirstRef() if (orientationIndex == -1) { // some sensor HALs don't provide an orientation sensor. mUserSensorList.add(aSensor); - } else { - // if we are doing our own rotation-vector, also add - // the orientation sensor and remove the HAL provided one. - mUserSensorList.replaceAt(aSensor, orientationIndex); } }