Allow shell access on /dev/uhid node

Node for /dev/uhid driver needs to be accessible
by shell for the 'hid' command in frameworks/base/cmds.
This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds'
in internal master.

Bug: 34052337
Test: CTS test for GamepadTestCase#testButtonA; Checked that
cat /dev/uhid does not raise permission error.

Change-Id: I861c1226b4a67272af7c2a93d7811bf87a083478
diff --git a/private/shell.te b/private/shell.te
index 9bc0bd1..afb1f49 100644
--- a/private/shell.te
+++ b/private/shell.te
@@ -1,5 +1,8 @@
 typeattribute shell coredomain;
 
+# allow shell input injection
+allow shell uhid_device:chr_file rw_file_perms;
+
 # systrace support - allow atrace to run
 allow shell debugfs_tracing:dir r_dir_perms;
 allow shell debugfs_tracing:file r_file_perms;