From: Aravind Akella Date: Tue, 21 Jul 2015 00:29:33 +0000 (-0700) Subject: Check for the presence of accel and magnetometer sensors before adding AOSP fusion... X-Git-Tag: android-x86-7.1-r1~326^2~19^2~48^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e6406e35;p=android-x86%2Fframeworks-native.git 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) --- diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index c316ef6eb8..30ec458342 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<