From 4cf9742078c4b48c3b9c301044f64314a8f07a9f Mon Sep 17 00:00:00 2001 From: Arne Coucheron Date: Wed, 5 Nov 2014 05:17:05 +0100 Subject: [PATCH] sensorservice: Register orientation sensor if HAL doesn't provide it * In KitKat and on most Samsung devices, the orientation sensor is not getting registered, and makes the compass non-working in a lot of apps. This patch enables the sensor for such devices. Change-Id: I0ebba72ec4aa2cfa02c21a6daff0c356c6793fd0 (cherry picked from commit 98fa6f1152da759ef3eaf36cb16e0aaf2013376a) --- services/sensorservice/SensorService.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index 313011a4d..2d35fe918 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -146,9 +146,14 @@ void SensorService::onFirstRef() aSensor = registerVirtualSensor( new OrientationSensor() ); if (virtualSensorsNeeds & (1<