Add sysfs_extcon for /sys/class/extcon

Bug: 124364409
Change-Id: Idc33732454674bbdc7f4ff6eda173acc24e318b3
Test: cherry picked to pi-tv-dr-dev and tested on JBL Link bar
diff --git a/private/compat/28.0/28.0.cil b/private/compat/28.0/28.0.cil
index f5b5d09..cc3502b 100644
--- a/private/compat/28.0/28.0.cil
+++ b/private/compat/28.0/28.0.cil
@@ -1538,6 +1538,7 @@
 (typeattributeset swap_block_device_28_0 (swap_block_device))
 (typeattributeset sysfs_28_0
   ( sysfs
+    sysfs_extcon
     sysfs_loop))
 (typeattributeset sysfs_android_usb_28_0 (sysfs_android_usb))
 (typeattributeset sysfs_batteryinfo_28_0 (sysfs_batteryinfo))
diff --git a/private/genfs_contexts b/private/genfs_contexts
index 9d58f0a..11edf66 100644
--- a/private/genfs_contexts
+++ b/private/genfs_contexts
@@ -100,6 +100,7 @@
 genfscon sysfs / u:object_r:sysfs:s0
 genfscon sysfs /devices/system/cpu u:object_r:sysfs_devices_system_cpu:s0
 genfscon sysfs /class/android_usb                 u:object_r:sysfs_android_usb:s0
+genfscon sysfs /class/extcon                      u:object_r:sysfs_extcon:s0
 genfscon sysfs /class/leds                        u:object_r:sysfs_leds:s0
 genfscon sysfs /class/net                         u:object_r:sysfs_net:s0
 genfscon sysfs /class/rfkill/rfkill0/state        u:object_r:sysfs_bluetooth_writable:s0
diff --git a/private/system_server.te b/private/system_server.te
index 2751b09..7ed5339 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -314,6 +314,8 @@
 r_dir_file(system_server, sysfs_android_usb)
 allow system_server sysfs_android_usb:file w_file_perms;
 
+allow system_server sysfs_extcon:dir r_dir_perms;
+
 r_dir_file(system_server, sysfs_ipv4)
 allow system_server sysfs_ipv4:file w_file_perms;
 
diff --git a/public/file.te b/public/file.te
index a4b51b2..42491dc 100644
--- a/public/file.te
+++ b/public/file.te
@@ -75,6 +75,7 @@
 type sysfs_bluetooth_writable, fs_type, sysfs_type, mlstrustedobject;
 type sysfs_dm, fs_type, sysfs_type;
 type sysfs_dt_firmware_android, fs_type, sysfs_type;
+type sysfs_extcon, fs_type, sysfs_type;
 type sysfs_ipv4, fs_type, sysfs_type;
 type sysfs_kernel_notes, fs_type, sysfs_type, mlstrustedobject;
 type sysfs_leds, fs_type, sysfs_type;