Snap for 8146528 from 9a49c9bfb889bb03070c1f1eafcd39877294e777 to tm-release

Change-Id: I8e5adbd27039c42eb80a0fbadb73a1927509e59b
diff --git a/vendor/google/file_contexts b/vendor/google/file_contexts
index cdb877d..b6bdd67 100644
--- a/vendor/google/file_contexts
+++ b/vendor/google/file_contexts
@@ -1,4 +1,5 @@
 # vendor binaries
-/vendor/bin/hw/android\.hardware\.usb@1\.3-service\.barbet                             u:object_r:hal_usb_impl_exec:s0
+/vendor/bin/hw/android\.hardware\.usb-service\.barbet                                  u:object_r:hal_usb_impl_exec:s0
+/vendor/bin/hw/android\.hardware\.usb\.gadget-service\.barbet                          u:object_r:hal_usb_gadget_impl_exec:s0
 /vendor/bin/hw/android\.hardware\.vibrator-service\.barbet                             u:object_r:hal_vibrator_default_exec:s0
 /vendor/bin/hw/android\.hardware\.dumpstate@1\.1-service\.barbet                       u:object_r:hal_dumpstate_impl_exec:s0
diff --git a/vendor/google/hal_usb_gadget_impl.te b/vendor/google/hal_usb_gadget_impl.te
new file mode 100644
index 0000000..ddd90c2
--- /dev/null
+++ b/vendor/google/hal_usb_gadget_impl.te
@@ -0,0 +1,14 @@
+type hal_usb_gadget_impl, domain;
+hal_server_domain(hal_usb_gadget_impl, hal_usb)
+hal_server_domain(hal_usb_gadget_impl, hal_usb_gadget)
+
+type hal_usb_gadget_impl_exec, vendor_file_type, exec_type, file_type;
+init_daemon_domain(hal_usb_gadget_impl)
+
+allow hal_usb_gadget_impl configfs:dir { create rmdir };
+allow hal_usb_gadget_impl functionfs:dir { watch watch_reads };
+set_prop(hal_usb_gadget_impl, vendor_usb_prop)
+
+allow hal_usb_gadget_impl sysfs_batteryinfo:dir r_dir_perms;
+allow hal_usb_gadget_impl sysfs_batteryinfo:file rw_file_perms;
+allow hal_usb_gadget_impl sysfs_extcon:dir search;