binder_call(hal_camera_default, platform_app)

allow hal_camera_default mnt_vendor_file:dir { search };
allow hal_camera_default proc_stat:file { open read };
allow hal_camera_default vendor_xdsp_device:chr_file { read };

# Allow Camera to access system_server
allow hal_camera_default system_server:binder { call transfer };

# Camera Post Processing
type vendor_hal_camerapostproc_xiaomi_hwservice, hwservice_manager_type;

hal_server_domain(hal_camera_default, vendor_hal_camerapostproc_xiaomi)
add_hwservice(hal_camera_server, vendor_hal_camerapostproc_xiaomi_hwservice)

allow hal_camera_client vendor_hal_camerapostproc_xiaomi_hwservice:hwservice_manager find;

# Allow camera to access /data/misc
typeattribute hal_camera_default data_between_core_and_vendor_violators;

# Allow camera to access /data/misc
allow hal_camera_default camera_data_file:sock_file write;
allow hal_camera_default camera_data_file:dir create_dir_perms;
allow hal_camera_default camera_data_file:file create_file_perms;
