Add camera2 extension property policies

These properties allow to vendors to provide their
own camera2 extensions service. The properties
must be accesible to any android app that wishes
to use camera2 extensions.

Change-Id: I94c7ac336b3103355124830320787472f0d2a8b6
This commit is contained in:
Diego Wilson 2021-06-18 23:59:41 +00:00
parent 111c57970f
commit 5908c353e3
5 changed files with 9 additions and 0 deletions

View file

@ -6,6 +6,7 @@
(typeattributeset new_objects
( new_objects
artd_service
camera2_extensions_prop
power_stats_service
transformer_service
))

View file

@ -330,6 +330,9 @@ ro.camera.enableLazyHal u:object_r:camera_config_prop:s0 exact bool
ro.camerax.extensions.enabled u:object_r:camerax_extensions_prop:s0 exact bool
ro.vendor.camera.extensions.package u:object_r:camera2_extensions_prop:s0 exact string
ro.vendor.camera.extensions.service u:object_r:camera2_extensions_prop:s0 exact string
# ART properties
dalvik.vm. u:object_r:dalvik_config_prop:s0
ro.dalvik.vm. u:object_r:dalvik_config_prop:s0

View file

@ -593,5 +593,8 @@ neverallow appdomain system_bootstrap_lib_file:file
neverallow appdomain system_bootstrap_lib_file:dir
{ open read getattr search };
# Allow to read ro.vendor.camera.extensions.enabled
get_prop(appdomain, camera2_extensions_prop)
# Allow to ro.camerax.extensions.enabled
get_prop(appdomain, camerax_extensions_prop)

View file

@ -123,6 +123,7 @@ system_vendor_config_prop(build_odm_prop)
system_vendor_config_prop(build_vendor_prop)
system_vendor_config_prop(camera_calibration_prop)
system_vendor_config_prop(camera_config_prop)
system_vendor_config_prop(camera2_extensions_prop)
system_vendor_config_prop(camerax_extensions_prop)
system_vendor_config_prop(charger_config_prop)
system_vendor_config_prop(codec2_config_prop)

View file

@ -218,6 +218,7 @@ allow vendor_init self:capability sys_nice;
set_prop(vendor_init, apk_verity_prop)
set_prop(vendor_init, bluetooth_a2dp_offload_prop)
set_prop(vendor_init, bluetooth_audio_hal_prop)
set_prop(vendor_init, camera2_extensions_prop)
set_prop(vendor_init, camerax_extensions_prop)
set_prop(vendor_init, cpu_variant_prop)
set_prop(vendor_init, dalvik_runtime_prop)