Lei Ju | f7f93da | 2023-12-15 14:48:25 -0800 | [diff] [blame^] | 1 | # Allow context hub HAL to communicate with daemon via socket |
| 2 | unix_socket_connect(hal_contexthub_default, chre, chre) |
| 3 | |
| 4 | # Permit communication with AoC |
| 5 | allow hal_contexthub_default aoc_device:chr_file rw_file_perms; |
| 6 | |
| 7 | # Allow context hub HAL to determine AoC's current clock |
| 8 | allow hal_contexthub_default sysfs_aoc:dir search; |
| 9 | allow hal_contexthub_default sysfs_aoc_boottime:file r_file_perms; |
| 10 | |
| 11 | # Allow context hub HAL to create thread to watch AOC's device |
| 12 | allow hal_contexthub_default aoc_device:dir r_dir_perms; |
| 13 | |
| 14 | # Allow context hub HAL to use the USF low latency transport |
| 15 | usf_low_latency_transport(hal_contexthub_default) |
| 16 | |
| 17 | # Allow context hub HAL to talk to the WiFi HAL |
| 18 | binder_call(hal_contexthub_default, hal_wifi_ext) |
| 19 | allow hal_contexthub_default hal_wifi_ext_service:service_manager find; |
| 20 | |
| 21 | # Allow context hub HAL to talk to stats service |
| 22 | binder_call(hal_contexthub_default, stats_service_server) |
| 23 | allow hal_contexthub_default fwk_stats_service:service_manager find; |
| 24 | |
| 25 | # Allow context hub HAL to use WakeLock |
| 26 | wakelock_use(hal_contexthub_default) |
| 27 | |
| 28 | # Allow context hub HAL to block suspend, which is required to use EPOLLWAKEUP |
| 29 | allow hal_contexthub_default self:global_capability2_class_set block_suspend; |