Merges FrameBuffer and FBBroadcast regions into the Screen region

- Grants the appropriate permissions to the screen region
- Configures selinux for the screen region (might need more work)

Bug: 72837252
Test: local
Change-Id: I1b5a429b443d3611d6ce62a75b0a95a090a1d430
diff --git a/shared/config/init.vsoc.rc b/shared/config/init.vsoc.rc
index 4efe826..d8fa700 100644
--- a/shared/config/init.vsoc.rc
+++ b/shared/config/init.vsoc.rc
@@ -14,9 +14,6 @@
     setprop service.adb.tcp.port 5555
 
 on init
-    chown system root /dev/fb_broadcast
-    chmod 0660 /dev/fb_broadcast
-    restorecon /dev/fb_broadcast
     chown system root /dev/input_events
     chmod 0660 /dev/input_events
     restorecon /dev/input_events
@@ -26,9 +23,9 @@
     chown audioserver root /dev/audio_data
     chmod 0660 /dev/audio_data
     restorecon /dev/audio_data
-    chown system root /dev/framebuffer
-    chmod 0660 /dev/framebuffer
-    restorecon /dev/framebuffer
+    chown system root /dev/screen
+    chmod 0660 /dev/screen
+    restorecon /dev/screen
 
 
 on fs
diff --git a/shared/sepolicy/device.te b/shared/sepolicy/device.te
index d00e56c..24c317f 100644
--- a/shared/sepolicy/device.te
+++ b/shared/sepolicy/device.te
@@ -1,3 +1,4 @@
 # Device types
 type region_e2e_test_device, dev_type;
 type virtual_serial_device, dev_type;
+type region_screen_device, dev_type;
\ No newline at end of file
diff --git a/shared/sepolicy/file_contexts b/shared/sepolicy/file_contexts
index 4579da8..ecc4072 100644
--- a/shared/sepolicy/file_contexts
+++ b/shared/sepolicy/file_contexts
@@ -5,6 +5,7 @@
 /dev/e2e_manager                   u:object_r:region_e2e_test_device:s0
 /dev/e2e_primary                   u:object_r:region_e2e_test_device:s0
 /dev/e2e_secondary                 u:object_r:region_e2e_test_device:s0
+/dev/screen                        u:object_r:region_screen_device:s0
 /dev/vport[0-9]p[0-9]*             u:object_r:virtual_serial_device:s0
 
 #############################
diff --git a/shared/sepolicy/hal_graphics_allocator.te b/shared/sepolicy/hal_graphics_allocator.te
index 5975599..3136386 100644
--- a/shared/sepolicy/hal_graphics_allocator.te
+++ b/shared/sepolicy/hal_graphics_allocator.te
@@ -3,3 +3,4 @@
 
 # Read GCE initial metadata file
 allow hal_graphics_allocator_server initial_metadata_file:file r_file_perms;
+allow hal_graphics_allocator_server region_screen_device:chr_file rw_file_perms;
diff --git a/shared/sepolicy/vsoc_input_service.te b/shared/sepolicy/vsoc_input_service.te
index 5c9e331..5b7d41c 100644
--- a/shared/sepolicy/vsoc_input_service.te
+++ b/shared/sepolicy/vsoc_input_service.te
@@ -6,3 +6,5 @@
 # I/O with /dev/uinput
 allow vsoc_input_service uhid_device:chr_file rw_file_perms;
 
+# Framebuffer I/O (needed to obtain the screen size)
+allow vsoc_input_service region_screen_device:chr_file rw_file_perms;