This reverts commit 66ba3214b8.
Reason for revert: fix breakage in next build with build-time flag in
selinux policy.
Fixed the following audit logs:
[ 285.983545] type=1400 audit(1724270284.724:31): avc: denied { read } for comm="android.hardwar" name="state" dev="sysfs" ino=85740 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_udc:s0 tclass=file permissive=0
Bug: 339241080
Test: tested on Shiba trunk_staging and next builds
Flag: build.RELEASE_USB_UDC_SYSFS_SELINUX_POLICY_ENABLED
Change-Id: Ie4979f408a5bca0bb9b9762048ab716ddeeb4d2f
This is needed for system server to monitor usb gadget state.
Grant hal_usb_impl read access as it's needed by UsbDataSessionMonitor.
Bug: 339241080
Test: tested on Shiba
Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update
Change-Id: Iab3c20569cb22d7524ca303f6cb3eaf40aa2161d
Grant access to USB sysfs attributes.
Bug: 285199434
Test: no audit log in logcat after command execution
Change-Id: Ia5f3333318b47f4e0a05140bd6b95e939197fde5