Allow XML file paths to be customized with sysprop

Three properties are declared as vendor-init-settable:
ro.media.xml_variant.codecs
ro.media.xml_variant.codecs_performance
ro.media.xml_variant.profiles

media_codecs.xml can now be named
media_codecs${ro.media.xml_variant.codecs}.xml

media_codecs_performance.xml can now be named
media_codecs_performance${ro.media.xml_variant.codecs_performance}.xml

media_profiles_V1_0 can now be named
media_profiles${ro.media.xml_variant.profiles}.xml

Test: Rename "media_codecs.xml" to "media_codecs_test.xml",
set ro.media.xml_variant.codecs to "_test", then
call "stagefright -i".

Test: Rename "media_codecs_performance.xml" to
"media_codecs_performance_test.xml",
set ro.media.xml_variant.codecs_performance to "_test", then
run android.media.cts.VideoDecoderPerfTest.

Test: Rename "media_profiles_V1_0.xml" to "media_profiles_test.xml",
set ro.media.xml_variant.profiles to "_test", then
run vts_mediaProfiles_validate_test.

Bug: 142102953
Change-Id: I407a0a327fcc8e799bb4079b11048a497565be48
diff --git a/private/compat/29.0/29.0.ignore.cil b/private/compat/29.0/29.0.ignore.cil
index c1ea949..ff2dd0a 100644
--- a/private/compat/29.0/29.0.ignore.cil
+++ b/private/compat/29.0/29.0.ignore.cil
@@ -72,6 +72,7 @@
     mirror_data_file
     light_service
     linkerconfig_file
+    media_variant_prop
     metadata_bootstat_file
     mnt_pass_through_file
     mock_ota_prop
diff --git a/private/property_contexts b/private/property_contexts
index 216531c..ab6c4f8 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -428,6 +428,10 @@
 ro.lmk.use_minfree_levels       u:object_r:exported3_default_prop:s0 exact bool
 ro.lmk.upgrade_pressure         u:object_r:exported3_default_prop:s0 exact int
 
+ro.media.xml_variant.codecs             u:object_r:media_variant_prop:s0 exact string
+ro.media.xml_variant.codecs_performance u:object_r:media_variant_prop:s0 exact string
+ro.media.xml_variant.profiles           u:object_r:media_variant_prop:s0 exact string
+
 ro.minui.default_rotation u:object_r:exported3_default_prop:s0 exact string
 ro.minui.overscan_percent u:object_r:exported3_default_prop:s0 exact int
 ro.minui.pixel_format     u:object_r:exported3_default_prop:s0 exact string
diff --git a/private/zygote.te b/private/zygote.te
index f9e5476..f27005e 100644
--- a/private/zygote.te
+++ b/private/zygote.te
@@ -193,6 +193,9 @@
 # Send unsolicited message to system_server
 unix_socket_send(zygote, system_unsolzygote, system_server)
 
+# Allow zygote to access media_variant_prop for static initialization
+get_prop(zygote, media_variant_prop)
+
 ###
 ### neverallow rules
 ###