platform_system_sepolicy/public/vr_hwc.te
Daniel Nicoara 1fc0755033 Allow vr_hwc and virtual_touchpad to query for permissions
Allow the services to do binder calls to system_server in order to check
for app permissions.

Bug: 37542947
Test: Compiled and ran on device ensuring no permission errors
Change-Id: If91895607eb118f689cf2e11c63945e9f83bf2a0
2017-04-21 17:15:03 -04:00

33 lines
953 B
Text

type vr_hwc, domain;
type vr_hwc_exec, exec_type, file_type;
# Get buffer metadata.
hal_client_domain(vr_hwc, hal_graphics_allocator)
binder_use(vr_hwc)
binder_service(vr_hwc)
binder_call(vr_hwc, surfaceflinger)
# Needed to check for app permissions.
binder_call(vr_hwc, system_server)
# TODO(dnicoara): Remove once vr_wm is disabled.
binder_call(vr_hwc, vr_wm)
add_service(vr_hwc, vr_hwc_service)
# Hosts the VR HWC implementation and provides a simple Binder interface for VR
# Window Manager to receive the layers/buffers.
hwbinder_use(vr_hwc)
# Load vendor libraries.
allow vr_hwc system_file:dir r_dir_perms;
allow vr_hwc ion_device:chr_file r_file_perms;
# Allow connection to VR DisplayClient to get the primary display metadata
# (ie: size).
use_pdx(vr_hwc, surfaceflinger)
# Requires access to the permission service to validate that clients have the
# appropriate VR permissions.
allow vr_hwc permission_service:service_manager find;