Add a new system property persist.graphics.egl

This new system property will be read and written
by a new developer option switch, through gpuservice.

Based on the value stored in persis.graphics.egl,
we will load different GLES driver.

e.g.
persist.graphics.egl == $ro.hardware.egl: load native GLES driver
persist.graphics.egl == angle: load angle as GLES driver

Bug: b/270994705
Test: m; flash and check Pixel 7 boots fine
Change-Id: Idec4b947d0c69c52cd798df4f834053bd306cf5f
diff --git a/private/compat/33.0/33.0.ignore.cil b/private/compat/33.0/33.0.ignore.cil
index cfbe2da..d2a4be4 100644
--- a/private/compat/33.0/33.0.ignore.cil
+++ b/private/compat/33.0/33.0.ignore.cil
@@ -26,6 +26,7 @@
     fwk_camera_service
     fwk_sensor_service
     grammatical_inflection_service
+    graphics_config_writable_prop
     hal_bluetooth_service
     hal_bootctl_service
     hal_cas_service
diff --git a/private/coredomain.te b/private/coredomain.te
index f8b2ee5..83930a5 100644
--- a/private/coredomain.te
+++ b/private/coredomain.te
@@ -6,6 +6,7 @@
 get_prop(coredomain, exported_pm_prop)
 get_prop(coredomain, ffs_config_prop)
 get_prop(coredomain, graphics_config_prop)
+get_prop(coredomain, graphics_config_writable_prop)
 get_prop(coredomain, hdmi_config_prop)
 get_prop(coredomain, init_service_status_private_prop)
 get_prop(coredomain, lmkd_config_prop)
diff --git a/private/gpuservice.te b/private/gpuservice.te
index 8388e89..7ee60ec 100644
--- a/private/gpuservice.te
+++ b/private/gpuservice.te
@@ -61,5 +61,8 @@
 
 add_service(gpuservice, gpu_service)
 
+# Needed for enabling write access to persist.graphics.egl from developer option switch UI, through gpuservice.
+set_prop(gpuservice, graphics_config_writable_prop)
+
 # Only uncomment below line when in development
 # userdebug_or_eng(`permissive gpuservice;')
diff --git a/private/property_contexts b/private/property_contexts
index 603c70b..f19ae0c 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -1389,6 +1389,7 @@
 
 graphics.gpu.profiler.support          u:object_r:graphics_config_prop:s0 exact bool
 graphics.gpu.profiler.vulkan_layer_apk u:object_r:graphics_config_prop:s0 exact string
+persist.graphics.egl             u:object_r:graphics_config_writable_prop:s0 exact string
 
 ro.cpuvulkan.version u:object_r:graphics_config_prop:s0 exact int