type uwb_vendor_app, domain;

app_domain(uwb_vendor_app)

not_recovery(`
hal_client_domain(uwb_vendor_app, hal_uwb_vendor)

allow uwb_vendor_app app_api_service:service_manager find;
allow uwb_vendor_app hal_uwb_vendor_service:service_manager find;
allow uwb_vendor_app nfc_service:service_manager find;
allow uwb_vendor_app radio_service:service_manager find;

allow uwb_vendor_app uwb_vendor_data_file:file create_file_perms;
allow uwb_vendor_app uwb_vendor_data_file:dir create_dir_perms;

allow hal_uwb_vendor_default self:global_capability_class_set { sys_nice };
allow hal_uwb_vendor_default kernel:process { setsched };
# UwbVendorService must be able to read USRA version from vendor_secure_element_prop
get_prop(uwb_vendor_app, vendor_secure_element_prop)
# UwbVendorService must be able to write country code prop
set_prop(uwb_vendor_app, vendor_uwb_calibration_country_code)

binder_call(uwb_vendor_app, hal_uwb_vendor_default)
')
