From e6406e3589fa490bfa435384d2a3a6ac678e08fd Mon Sep 17 00:00:00 2001 From: Aravind Akella Date: Mon, 20 Jul 2015 17:29:33 -0700 Subject: [PATCH] Check for the presence of accel and magnetometer sensors before adding AOSP fusion sensors. DO NOT MERGE Bug: 22502485 Change-Id: I3d9018649302b98004e4e216b2173e8411a08501 (cherry picked from commit f504789dd3b3073de176fd2fa09dd9fc9de5bc1f) --- services/sensorservice/SensorService.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index c316ef6eb..30ec45834 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -82,7 +82,7 @@ void SensorService::onFirstRef() ssize_t count = dev.getSensorList(&list); if (count > 0) { ssize_t orientationIndex = -1; - bool hasGyro = false; + bool hasGyro = false, hasAccel = false, hasMag = false; uint32_t virtualSensorsNeeds = (1<