sepolicy: update policy for sensors

Updating sensor policy to be in comply latest policies.
Also, compile sensors policies only for SSC based targets.

Change-Id: I21157ce454f18a81bf1df3354ee4469d56348152
diff --git a/Android.mk b/Android.mk
index 544b49c..ee6a87d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,4 +1,5 @@
 # Board specific SELinux policy variable definitions
+ifeq ($(call is-vendor-board-platform,QCOM),true)
 BOARD_SEPOLICY_DIRS := \
        device/qcom/sepolicy \
        device/qcom/sepolicy/common \
@@ -33,8 +34,6 @@
        diag.te \
        diag_test.te \
        audiod.te \
-       sensors.te \
-       sensors_test.te \
        system_app.te \
        thermal-engine.te \
        global_macros.te \
@@ -43,4 +42,18 @@
        init_shell.te \
        mpdecision.te \
        mm-qcamerad.te \
-       domain.te
+       domain.te \
+       init_shell.te
+
+# Compile sensor pilicy only for SSC targets
+SSC_TARGET_LIST := apq8084
+SSC_TARGET_LIST += msm8226
+SSC_TARGET_LIST += msm8960
+SSC_TARGET_LIST += msm8974
+SSC_TARGET_LIST += msm8994
+
+#ifeq ($(call is-board-platform-in-list,$(SSC_TARGET_LIST)),true)
+BOARD_SEPOLICY_UNION += sensors.te
+BOARD_SEPOLICY_UNION += sensors_test.te
+#endif
+endif