Revert "Enable binderized sensor service for Marlin."

This reverts commit 64185b410496146059befa4bbc51e26a23357710.

Change-Id: I9beb58e8ffe8cd496a8d90f25b8ce92b7b2b15d8
(cherry picked from commit 1019e50b41245d75f606daee2f5476f74125fa18)
diff --git a/device-common.mk b/device-common.mk
index 7e27b8f..0201105 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -119,8 +119,7 @@
     android.hardware.memtrack@1.0-service \
     android.hardware.nfc@1.0-service \
     android.hardware.power@1.0-service \
-    android.hardware.sensors@1.0-service \
-    android.hardware.vibrator@1.0-service
+    android.hardware.vibrator@1.0-service \
 
 # Light HAL
 PRODUCT_PACKAGES += \
diff --git a/sepolicy/file.te b/sepolicy/file.te
index f0e5c29..214ce0e 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -14,8 +14,6 @@
 type display_data_file, file_type, data_file_type;
 type netmgr_data_file, file_type, data_file_type;
 type nanohub_lock_file, file_type, data_file_type;
-type sensors_cal_file, file_type;
-type sensors_saved_settings_file, file_type, data_file_type;
 
 # /sys
 type sysfs_camera, sysfs_type, fs_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 979a540..a1749c8 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -190,9 +190,7 @@
 /data/system/perfd(/.*)?         u:object_r:perfd_data_file:s0
 /data/misc/radio(/.*)?           u:object_r:radio_data_file:s0
 /data/misc/netmgr(/.*)?          u:object_r:netmgr_data_file:s0
-/data/system/nanohub_lock  u:object_r:nanohub_lock_file:s0
-/data/misc/sensorcal_saved.json  u:object_r:sensors_saved_settings_file:s0
-
+/data/system/nanohub_lock(/.*)?  u:object_r:nanohub_lock_file:s0
 
 # /
 
@@ -204,7 +202,6 @@
 /persist(/.*)?          u:object_r:persist_file:s0
 /persist/data(/.*)?     u:object_r:persist_data_file:s0
 /persist/display(/.*)?  u:object_r:persist_display_file:s0
-/persist/sensorcal.json  u:object_r:sensors_cal_file:s0
 
 /metadata               u:object_r:rootfs:s0
 /metadata/.*            u:object_r:vold_data_file:s0
diff --git a/sepolicy/hal_sensors.te b/sepolicy/hal_sensors.te
deleted file mode 100644
index 5f02d06..0000000
--- a/sepolicy/hal_sensors.te
+++ /dev/null
@@ -1,24 +0,0 @@
-# TODO: b/34980308 : Do not use the data or persist partition.
-
-#Allow access to nanohub device
-allow hal_sensors sensors_device:chr_file rw_file_perms;
-
-# Allow access to the nanohub_lock_file to allow the contexthub and
-# the sensor hal to synchronize access
-allow hal_sensors nanohub_lock_file:dir create_dir_perms;
-allow hal_sensors nanohub_lock_file:file create_file_perms;
-
-# Allow acess to uinput for lidstate determination
-allow hal_sensors uhid_device:chr_file rw_file_perms;
-
-# Allow access to persistent partition for calibration data
-allow hal_sensors persist_file:dir search;
-allow hal_sensors sensors_cal_file:dir create_dir_perms;
-allow hal_sensors sensors_cal_file:file create_file_perms;
-
-# Allow access to saved settings file
-allow hal_sensors sensors_saved_settings_file:dir create_dir_perms;
-allow hal_sensors sensors_saved_settings_file:file create_file_perms;
-
-# Allow access to sensor properties
-set_prop(hal_sensors, sensors_prop)
diff --git a/vintf.xml b/vintf.xml
index 8c6e1cf..0c37db0 100644
--- a/vintf.xml
+++ b/vintf.xml
@@ -115,7 +115,7 @@
     </hal>
     <hal format="hidl">
         <name>android.hardware.sensors</name>
-        <transport>toggled</transport>
+        <transport>passthrough</transport>
         <impl level="generic"></impl>
         <version>1.0</version>
     </hal>