platform_system_sepolicy/public/hal_sensors.te
Martijn Coenen 0d1f7d29f7 Grant CAP_SYS_NICE to processes that need it.
New binder kernel changes extend the areas where
binder will set real-time scheduling priorities
on threads; to make sure the driver can correctly
determine whether a process is allowed to run
at real-time priority or not, add the capability
to the services that need it.

Bug: 37293077
Test: processes run at real-time prio on incoming
      real-time binder calls.

Change-Id: Ia4b3e5ecb1f5e18e7272bdaaad5c31a856719633
2017-05-09 09:53:46 -07:00

15 lines
601 B
Text

# HwBinder IPC from client to server
binder_call(hal_sensors_client, hal_sensors_server)
add_hwservice(hal_sensors_server, hal_sensors_hwservice)
allow hal_sensors_client hal_sensors_hwservice:hwservice_manager find;
# Allow sensor hals to access ashmem memory allocated by apps
allow hal_sensors { appdomain -isolated_app }:fd use;
# Allow sensor hals to access ashmem memory allocated by android.hidl.allocator
# fd is passed in from framework sensorservice HAL.
allow hal_sensors hal_allocator:fd use;
# allow to run with real-time scheduling policy
allow hal_sensors self:capability sys_nice;