typeattribute vendor_pcs_app coredomain;

app_domain(vendor_pcs_app);
net_domain(vendor_pcs_app);
bluetooth_domain(vendor_pcs_app);

allow vendor_pcs_app {
    app_api_service
    audioserver_service
    cameraserver_service
    drmserver_service
    mediametrics_service
    mediaserver_service
    nfc_service
    radio_service
}:service_manager find;

# Following allowances were replicated from priv_app
# Write to /cache.
allow vendor_pcs_app { cache_file cache_recovery_file }:dir create_dir_perms;
allow vendor_pcs_app { cache_file cache_recovery_file }:file create_file_perms;
# /cache is a symlink to /data/cache on some devices. Allow reading the link.
allow vendor_pcs_app cache_file:lnk_file r_file_perms;

# Access to /data/media.
allow vendor_pcs_app media_rw_data_file:dir create_dir_perms;
allow vendor_pcs_app media_rw_data_file:file create_file_perms;

# Access to /data/preloads
r_dir_file(vendor_pcs_app, preloads_data_file)
r_dir_file(vendor_pcs_app, preloads_media_file)

