From 68a1cea0871a356d7c6e2989ec576bff3178db7e Mon Sep 17 00:00:00 2001
From: Simon Shields <keepcalm444@gmail.com>
Date: Wed, 23 Dec 2015 14:29:13 +1100
Subject: i9300: ensure we don't build opensource sensors

currently the compass seems to be really broken, so we'll use the
proprietary ones for now

Change-Id: I195e0765da7789d38940835d9e8c6eff4e09a900
---
 BoardConfig.mk        | 3 +++
 libsensors/Android.mk | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/BoardConfig.mk b/BoardConfig.mk
index 3cbef38..3130ef3 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -31,6 +31,9 @@ COMMON_GLOBAL_CFLAGS += -DDISABLE_ASHMEM_TRACKING
 # Graphics
 TARGET_REQUIRES_SYNCHRONOUS_SETSURFACE := true
 
+# Sensors
+BOARD_USES_OPENSOURCE_SENSORS := false
+
 # Bluetooth
 BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/i9300/bluetooth
 
diff --git a/libsensors/Android.mk b/libsensors/Android.mk
index 8d15195..8bdcd66 100644
--- a/libsensors/Android.mk
+++ b/libsensors/Android.mk
@@ -12,7 +12,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
+ifeq ($(BOARD_USES_OPENSOURCE_SENSORS),true)
 LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
@@ -46,3 +46,4 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
 LOCAL_MODULE_TAGS := optional
 
 include $(BUILD_SHARED_LIBRARY)
+endif
-- 
cgit v1.1