blob: 4cb42068b7df56a9fb0e8e7359b2026bef7854f5 [file] [log] [blame]
# TODO: b/34980308 : Do not use the data or persist partition.
#Allow access to nanohub device
allow hal_sensors sensors_device:chr_file rw_file_perms;
# Allow access to the nanohub_lock_file to allow the contexthub and
# the sensor hal to synchronize access
allow hal_sensors nanohub_lock_file:dir create_dir_perms;
allow hal_sensors nanohub_lock_file:file create_file_perms;
# Allow acess to uinput for lidstate determination
allow hal_sensors uhid_device:chr_file rw_file_perms;
# Allow access to persistent partition for calibration data
allow hal_sensors persist_file:dir search;
allow hal_sensors sensors_cal_file:dir create_dir_perms;
allow hal_sensors sensors_cal_file:file create_file_perms;
# Allow access to saved settings file
allow hal_sensors sensors_saved_settings_file:dir create_dir_perms;
allow hal_sensors sensors_saved_settings_file:file create_file_perms;
# Allow access to sensor properties
set_prop(hal_sensors, sensors_prop)
# Allow access to gralloc shared memory (ion), for sensor direct report
allow hal_sensors ion_device:chr_file { open read };
allow hal_sensors hal_graphics_allocator:fd use;