Snap for 5681426 from 74ee26021e4e8196594f35e4c4a8538007529f04 to qt-release

Change-Id: Iee15c3a69fef9a06cb6e815fe701b43c90c0f7fe
diff --git a/vendor/google/file_contexts b/vendor/google/file_contexts
index b05a1a0..23eca9c 100644
--- a/vendor/google/file_contexts
+++ b/vendor/google/file_contexts
@@ -20,6 +20,7 @@
 /vendor/bin/init\.ramoops\.sh                                               u:object_r:ramoops_exec:s0
 /vendor/bin/modem_svc                                                       u:object_r:modem_svc_exec:s0
 /vendor/bin/pixelstats-vendor                                               u:object_r:pixelstats_vendor_exec:s0
+/vendor/bin/hw/small_hals\.crosshatch-service                               u:object_r:small_hals_exec:s0
 /vendor/bin/hw/vendor\.google\.wifi_ext@1\.0-service-vendor                 u:object_r:hal_wifi_ext_exec:s0
 
 /data/vendor_ce/[0-9]+/ramoops(/.*)?                                        u:object_r:ramoops_vendor_data_file:s0
diff --git a/vendor/google/small_hals.te b/vendor/google/small_hals.te
new file mode 100644
index 0000000..b8e8359
--- /dev/null
+++ b/vendor/google/small_hals.te
@@ -0,0 +1,31 @@
+type small_hals, domain;
+hal_server_domain(small_hals, hal_light)
+hal_server_domain(small_hals, hal_memtrack)
+hal_server_domain(small_hals, hal_vibrator)
+
+type small_hals_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(small_hals)
+
+# Light Permissions
+
+# This is the same as a line below for vibrator.  We keep both so that it is
+# easier to see what rules are needed for what HAL.
+allow small_hals sysfs_msm_subsys:dir search;
+
+# Memtrack Permissions
+
+allow small_hals debugfs_kgsl:file { open read getattr };
+
+# Vibrator Permissions
+
+r_dir_file(small_hals, sysfs_leds)
+allow small_hals sysfs_leds:file w_file_perms;
+allow small_hals sysfs_msm_subsys:file rw_file_perms;
+# This is the same as a line above for light.  We keep both so that it is
+# easier to see what rules are needed for what HAL.
+allow small_hals sysfs_msm_subsys:dir search;
+
+# read-only permission to obtain the calibration data
+r_dir_file(small_hals, persist_haptics_file)
+allow small_hals mnt_vendor_file:dir search;
+allow small_hals persist_file:dir search;
diff --git a/vendor/qcom/common/file_contexts b/vendor/qcom/common/file_contexts
index 7f7bdb1..d85a1f7 100644
--- a/vendor/qcom/common/file_contexts
+++ b/vendor/qcom/common/file_contexts
@@ -135,7 +135,6 @@
 /vendor/bin/hw/android\.hardware\.drm@1\.2-service-lazy\.clearkey         u:object_r:hal_drm_clearkey_exec:s0
 /vendor/bin/hw/android\.hardware\.drm@1\.2-service\.widevine         u:object_r:hal_drm_widevine_exec:s0
 /vendor/bin/hw/android\.hardware\.drm@1\.2-service-lazy\.widevine         u:object_r:hal_drm_widevine_exec:s0
-/vendor/bin/hw/android\.hardware\.vibrator@1\.2-service\.crosshatch  u:object_r:hal_vibrator_default_exec:s0
 /vendor/bin/hw/android\.hardware\.keymaster@4\.0-service-qti         u:object_r:hal_keymaster_qti_exec:s0
 /vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service-qti        u:object_r:hal_gatekeeper_qti_exec:s0
 /vendor/bin/hw/android\.hardware\.gnss@1\.1-service-qti              u:object_r:hal_gnss_qti_exec:s0
@@ -147,7 +146,6 @@
 /vendor/bin/hw/vendor\.qti\.media\.c2@1\.0-service               u:object_r:mediacodec_exec:s0
 /vendor/bin/hw/vendor\.qti\.hardware\.display\.allocator@1\.0-service   u:object_r:hal_graphics_allocator_default_exec:s0
 /vendor/bin/hw/vendor\.google\.wireless_charger@1\.0-service-vendor       u:object_r:hal_wlc_exec:s0
-/vendor/bin/hw/hardware\.google\.light@1\.0-service                    u:object_r:hal_light_default_exec:s0
 
 ###############################################
 # same-process HAL files and their dependencies
diff --git a/vendor/qcom/common/hal_light_default.te b/vendor/qcom/common/hal_light_default.te
deleted file mode 100644
index b7de530..0000000
--- a/vendor/qcom/common/hal_light_default.te
+++ /dev/null
@@ -1 +0,0 @@
-allow hal_light_default sysfs_msm_subsys:dir search;
diff --git a/vendor/qcom/common/hal_memtrack_default.te b/vendor/qcom/common/hal_memtrack_default.te
deleted file mode 100644
index 4ffa74c..0000000
--- a/vendor/qcom/common/hal_memtrack_default.te
+++ /dev/null
@@ -1 +0,0 @@
-allow hal_memtrack_default debugfs_kgsl:file { open read getattr };
diff --git a/vendor/qcom/common/hal_vibrator_default.te b/vendor/qcom/common/hal_vibrator_default.te
deleted file mode 100644
index 41b336d..0000000
--- a/vendor/qcom/common/hal_vibrator_default.te
+++ /dev/null
@@ -1,9 +0,0 @@
-r_dir_file(hal_vibrator_default, sysfs_leds)
-allow hal_vibrator_default sysfs_leds:file w_file_perms;
-allow hal_vibrator_default sysfs_msm_subsys:file rw_file_perms;
-allow hal_vibrator_default sysfs_msm_subsys:dir search;
-
-# read-only permission to obtain the calibration data
-r_dir_file(hal_vibrator_default, persist_haptics_file)
-allow hal_vibrator_default mnt_vendor_file:dir search;
-allow hal_vibrator_default persist_file:dir search;