type vendor_hal_cameraperf_hwservice, hwservice_manager_type, protected_hwservice;
type vendor_hal_camerapostproc_xiaomi_hwservice, hwservice_manager_type;

r_dir_file(hal_camera_default, vendor_camera_persist_file)
r_dir_file(hal_camera_default, mnt_vendor_file)

get_prop(hal_camera_default, vendor_camera_prop)
set_prop(hal_camera_default, vendor_camera_prop)

hal_server_domain(hal_camera_default, vendor_hal_cameraperf)
hal_server_domain(hal_camera_default, vendor_hal_camerapostproc_xiaomi)

add_hwservice(hal_camera_server, vendor_hal_cameraperf_hwservice)
add_hwservice(hal_camera_server, vendor_hal_camerapostproc_xiaomi_hwservice)

allow hal_camera_client vendor_hal_cameraperf_hwservice:hwservice_manager find;
allow hal_camera_client vendor_hal_camerapostproc_xiaomi_hwservice:hwservice_manager find;
add_hwservice(hal_camera_default, hal_xiaomi_camera_hwservice)


allow hal_camera_default platform_app:binder { call transfer };
allow hal_camera_default priv_app:binder { call transfer };
allow hal_camera_default system_server:binder { call transfer };
allow hal_camera_default vendor_xdsp_device:chr_file r_file_perms;
allow hal_camera_default vendor_xdsp_device:chr_file { ioctl open read write };

dontaudit hal_camera_default property_type:file { getattr open map };
allow hal_camera_default system_server:binder { call };
allow hal_camera_default mnt_vendor_file:dir { search };
