diff options
author | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-05-01 19:15:46 +0200 |
---|---|---|
committer | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-05-01 19:15:46 +0200 |
commit | ab5fe40c78016ba8de078fd2a0e5d4d7dc115b22 (patch) | |
tree | 55d385fe85adf92ab7f6e8751a414e111390f020 | |
parent | 8310b9df8bb913ff4990ddc9a42781737a6aca3c (diff) | |
download | frameworks_native-ab5fe40c78016ba8de078fd2a0e5d4d7dc115b22.zip frameworks_native-ab5fe40c78016ba8de078fd2a0e5d4d7dc115b22.tar.gz frameworks_native-ab5fe40c78016ba8de078fd2a0e5d4d7dc115b22.tar.bz2 |
native: add flag to disable legacy sensors fusion
Causes problems on all p31xx devices.
http://pastebin.com/PabjFVWP
Change-Id: Iac9a913e0984d7e9e419772215d3fb3d1a0cb5e8
-rw-r--r-- | services/sensorservice/Android.mk | 4 | ||||
-rw-r--r-- | services/sensorservice/SensorService.cpp | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/services/sensorservice/Android.mk b/services/sensorservice/Android.mk index c5926c6..0214d7e 100644 --- a/services/sensorservice/Android.mk +++ b/services/sensorservice/Android.mk @@ -33,6 +33,10 @@ LOCAL_SHARED_LIBRARIES := \ libui \ libgui +ifneq ($(BOARD_USE_LEGACY_SENSORS_FUSION),false) + LOCAL_CFLAGS += -DUSE_LEGACY_SENSORS_FUSION +endif + ifneq ($(BOARD_SYSFS_LIGHT_SENSOR),) LOCAL_CFLAGS += -DSYSFS_LIGHT_SENSOR=\"$(BOARD_SYSFS_LIGHT_SENSOR)\" endif diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index be1c150..cd523ce 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -48,9 +48,12 @@ #include "RotationVectorSensor2.h" #include "SensorFusion.h" #include "SensorService.h" + +#ifdef USE_LEGACY_SENSORS_FUSION #include "legacy/LegacyGravitySensor.h" #include "legacy/LegacyLinearAccelerationSensor.h" #include "legacy/LegacyRotationVectorSensor.h" +#endif namespace android { // --------------------------------------------------------------------------- @@ -123,12 +126,14 @@ void SensorService::onFirstRef() registerVirtualSensor( new OrientationSensor() ); registerVirtualSensor( new CorrectedGyroSensor(list, count) ); } +#ifdef USE_LEGACY_SENSORS_FUSION else { registerVirtualSensor( new LegacyRotationVectorSensor() ); registerVirtualSensor( new LegacyGravitySensor(list, count) ); registerVirtualSensor( new LegacyLinearAccelerationSensor(list, count) ); } +#endif // build the sensor list returned to users mUserSensorList = mSensorList; |